Skip to content

Commit

Permalink
Merge branch 'release-6.13.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 24, 2024
2 parents 2783f78 + 39c45a5 commit 5300c44
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"minimum-stability" : "dev",
"require": {
"oat-sa/oatbox-extension-installer": "~1.1||dev-master",
"oat-sa/generis" : ">=15.22",
"oat-sa/tao-core" : ">=54.10.0"
"oat-sa/tao-core": ">=54.14.7"
},
"autoload" : {
"psr-4" : {
Expand Down
46 changes: 46 additions & 0 deletions migrations/Version202406131030273245_taoBackOffice.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

declare(strict_types=1);

namespace oat\taoBackOffice\migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\Exception\IrreversibleMigration;
use oat\tao\model\featureFlag\FeatureFlagCheckerInterface;
use oat\tao\model\menu\SectionVisibilityFilter;
use oat\tao\scripts\tools\migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*
* phpcs:disable Squiz.Classes.ValidClassName
*/
final class Version202406131030273245_taoBackOffice extends AbstractMigration
{
public function getDescription(): string
{
return 'Hiding taoBo_remotelist and taoBo_tree sections in case solar design is enabled';
}

public function up(Schema $schema): void
{
/** @var SectionVisibilityFilter $sectionVisibilityFilter */
$sectionVisibilityFilter = $this->getServiceManager()->get(SectionVisibilityFilter::SERVICE_ID);

$sectionVisibilityFilter->hideSectionByFeatureFlag(
'taoBo_remotelist',
FeatureFlagCheckerInterface::FEATURE_FLAG_SOLAR_DESIGN_ENABLED
);
$sectionVisibilityFilter->hideSectionByFeatureFlag(
'taoBo_tree',
FeatureFlagCheckerInterface::FEATURE_FLAG_SOLAR_DESIGN_ENABLED
);

$this->getServiceManager()->register(SectionVisibilityFilter::SERVICE_ID, $sectionVisibilityFilter);
}

public function down(Schema $schema): void
{
throw new IrreversibleMigration();
}
}

0 comments on commit 5300c44

Please sign in to comment.