Skip to content
Snippets Groups Projects
Commit ff164255 authored by Claudiu Cristea's avatar Claudiu Cristea
Browse files

ISAICP-9052: Step definition to toggle EU OSS Catalogue.

parent ba0b1f21
No related branches found
No related tags found
No related merge requests found
......@@ -62,13 +62,15 @@ public static function disableOssCron(): void {
*/
public function toggleEuOssCatalogue(string $toggle): void {
assert(in_array($toggle, ['enable', 'disable'], TRUE));
$file = DRUPAL_ROOT . '/../disable-eu-oss-catalogue';
$switcher = \Drupal::getContainer()->get('joinup_core.switcher');
if ($toggle === 'enable') {
unlink($file);
$switcher->enable('eu-oss-catalogue');
}
else {
touch($file);
$switcher->enable('eu-oss-catalogue');
}
\Drupal::getContainer()->get('cache.page')->deleteAll();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment