processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); } /** * Declare the entity Report, as a customizable entity (can add custom fields) * * @param ContainerBuilder $container */ public function declareReportAsCustomizable(ContainerBuilder $container) { $bundles = $container->getParameter('kernel.bundles'); if (!isset($bundles['ChillCustomFieldsBundle'])) { throw new MissingBundleException('ChillCustomFieldsBundle'); } $container->prependExtensionConfig('chill_custom_fields', array('customizables_entities' => array( array( 'class' => 'Chill\ReportBundle\Entity\Report', 'name' => 'ReportEntity', 'options' => array( 'summary_fields' => array( 'form_type' => 'custom_fields_group_linked_custom_fields', 'form_options' => [ 'multiple' => true, 'expanded' => false ] ) )) ) ) ); } /** * declare routes from report bundle * * @param ContainerBuilder $container */ private function declareRouting(ContainerBuilder $container) { $container->prependExtensionConfig('chill_main', array( 'routing' => array( 'resources' => array( '@ChillReportBundle/Resources/config/routing.yml' ) ) )); } /** * {@inheritdoc} * * @param ContainerBuilder $container */ public function prepend(ContainerBuilder $container) { $this->declareReportAsCustomizable($container); $this->declareRouting($container); } }