Fix implicit variable creation.

This commit is contained in:
Pol Dellaiera
2021-11-09 15:25:45 +01:00
parent a1b381a3ea
commit 5e5dcaefe7
21 changed files with 464 additions and 581 deletions

View File

@@ -28,27 +28,31 @@ class ChillCustomFieldsExtension extends Extension implements PrependExtensionIn
$loader->load('services/fixtures.yaml');
$loader->load('services/controller.yaml');
$loader->load('services/command.yaml');
//add at least a blank array at 'customizable_entities' options
//$customizable_entities = (isset($config['customizables_entities'])
// && $config['customizables_entities'] !== FALSE)
//$customizable_entities = (isset($config['customizables_entities'])
// && $config['customizables_entities'] !== FALSE)
// ? $config['customizables_entities'] : array();
$container->setParameter('chill_custom_fields.customizables_entities',
$container->setParameter('chill_custom_fields.customizables_entities',
$config['customizables_entities']);
$container->setParameter('chill_custom_fields.show_empty_values',
$container->setParameter('chill_custom_fields.show_empty_values',
$config['show_empty_values_in_views']);
}
/* (non-PHPdoc)
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
public function prepend(ContainerBuilder $container)
public function prepend(ContainerBuilder $container)
{
// add form layout to twig resources
$twigConfig['form_themes'][] = 'ChillCustomFieldsBundle:Form:fields.html.twig';
$twigConfig = [
'form_themes' => [
'ChillCustomFieldsBundle:Form:fields.html.twig',
],
];
$container->prependExtensionConfig('twig', $twigConfig);
//add routes for custom bundle
$container->prependExtensionConfig('chill_main', array(
'routing' => array(