<?php
declare(strict_types=1);
/*
* This file is part of the PEC Platform DashboardBundle.
*
* (c) PEC project engineers & consultants
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pec\Bundle\DashboardBundle;
use Pec\Bundle\DashboardBundle\Service\WidgetInterface;
use Pec\Bundle\MediaBundle\PecMediaBundle;
use Pec\Bundle\PlatformBundle\PecPlatformBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* The Dashboard Bundle provides the possibility to create
* (and expand on) widgets that can be arranged/layouted
* on a dashboard.
*/
class PecDashboardBundle extends Bundle {
public static function getRequiredBundles(string $env, array &$requiredBundles = []): array {
if(isset($requiredBundles['PecDashboardBundle'])) {
return $requiredBundles;
}
$requiredBundles['PecDashboardBundle'] = '\Pec\Bundle\DashboardBundle\PecDashboardBundle';
PecMediaBundle::getRequiredBundles($env, $requiredBundles);
PecPlatformBundle::getRequiredBundles($env, $requiredBundles);
return $requiredBundles;
}
/**
* {@inheritDoc}
*/
public function build(ContainerBuilder $container): void {
$container->registerForAutoconfiguration(WidgetInterface::class)->addTag(WidgetInterface::TAG);
}
}