Skip to content

Commit

Permalink
Merge pull request #11 from ConvertGroupsAS/auto-registre-depend-bundles
Browse files Browse the repository at this point in the history
Auto-registration NelmioApiDocBundle during enable bundle
  • Loading branch information
labudzinski authored Feb 6, 2024
2 parents 3441952 + 723d0ab commit c274334
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/SimpleRESTAdapterBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
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 Nelmio\ApiDocBundle\NelmioApiDocBundle;

final class SimpleRESTAdapterBundle extends AbstractPimcoreBundle implements PimcoreBundleAdminClassicInterface
final class SimpleRESTAdapterBundle extends AbstractPimcoreBundle implements DependentBundleInterface, PimcoreBundleAdminClassicInterface
{
use BundleAdminClassicTrait;
use PackageVersionTrait;
Expand Down Expand Up @@ -52,4 +55,9 @@ protected function getComposerPackageName(): string
{
return self::PACKAGE_NAME;
}

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

0 comments on commit c274334

Please sign in to comment.