Skip to content

Commit

Permalink
[Task] Register dependant bundle (#733)
Browse files Browse the repository at this point in the history
* Adapted more changes

* Apply php-cs-fixer changes

---------

Co-authored-by: mcop1 <[email protected]>
  • Loading branch information
mcop1 and mcop1 authored Apr 26, 2023
1 parent 16e59d4 commit 323590c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/DependencyInjection/PimcoreDataHubExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@

namespace Pimcore\Bundle\DataHubBundle\DependencyInjection;

use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
use Pimcore\Bundle\CoreBundle\DependencyInjection\ConfigurationHelper;
use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

class PimcoreDataHubExtension extends Extension implements PrependExtensionInterface, DependentBundleInterface
class PimcoreDataHubExtension extends Extension implements PrependExtensionInterface
{
/**
* {@inheritdoc}
Expand All @@ -44,11 +41,6 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('config.yml');
}

public static function registerDependentBundles(BundleCollection $collection): void
{
$collection->addBundle(new PimcoreAdminBundle(), 60);
}

public function prepend(ContainerBuilder $container)
{
if ($container->hasExtension('doctrine_migrations')) {
Expand Down
10 changes: 9 additions & 1 deletion src/PimcoreDataHubBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@

namespace Pimcore\Bundle\DataHubBundle;

use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
use Pimcore\Bundle\DataHubBundle\DependencyInjection\Compiler\CustomDocumentTypePass;
use Pimcore\Bundle\DataHubBundle\DependencyInjection\Compiler\ImportExportLocatorsPass;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Installer\InstallerInterface;
use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class PimcoreDataHubBundle extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterface
class PimcoreDataHubBundle extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterface, DependentBundleInterface
{
use BundleAdminClassicTrait;
use PackageVersionTrait;
Expand All @@ -47,6 +50,11 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new CustomDocumentTypePass());
}

public static function registerDependentBundles(BundleCollection $collection): void
{
$collection->addBundle(new PimcoreAdminBundle(), 60);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 323590c

Please sign in to comment.