vendor/pec-platform/dashboard-bundle/Pec/Bundle/DashboardBundle/PecDashboardBundle.php line 26

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the PEC Platform DashboardBundle.
  5.  *
  6.  * (c) PEC project engineers &amp; consultants
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Pec\Bundle\DashboardBundle;
  12. use Pec\Bundle\DashboardBundle\Service\WidgetInterface;
  13. use Pec\Bundle\MediaBundle\PecMediaBundle;
  14. use Pec\Bundle\PlatformBundle\PecPlatformBundle;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18.  * The Dashboard Bundle provides the possibility to create
  19.  * (and expand on) widgets that can be arranged/layouted
  20.  * on a dashboard.
  21.  */
  22. class PecDashboardBundle extends Bundle {
  23.     public static function getRequiredBundles(string $env, array &$requiredBundles = []): array {
  24.         if(isset($requiredBundles['PecDashboardBundle'])) {
  25.             return $requiredBundles;
  26.         }
  27.         $requiredBundles['PecDashboardBundle'] = '\Pec\Bundle\DashboardBundle\PecDashboardBundle';
  28.         PecMediaBundle::getRequiredBundles($env$requiredBundles);
  29.         PecPlatformBundle::getRequiredBundles($env$requiredBundles);
  30.         return $requiredBundles;
  31.     }
  32.     /**
  33.      * {@inheritDoc}
  34.      */
  35.     public function build(ContainerBuilder $container): void {
  36.         $container->registerForAutoconfiguration(WidgetInterface::class)->addTag(WidgetInterface::TAG);
  37.     }
  38. }