Allow to enable multiple simultaneous accompanyingPeriods

This commit is contained in:
2021-03-30 18:16:37 +02:00
parent fa5d0fbd21
commit 1d6a8987e9
3 changed files with 31 additions and 11 deletions

View File

@@ -56,6 +56,9 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
$this->handlePersonFieldsParameters($container, $config['person_fields']);
$this->handleAccompanyingPeriodsFieldsParameters($container, $config['accompanying_periods_fields']);
$container->setParameter('chill_person.allow_multiple_simultaneous_accompanying_periods',
$config['allow_multiple_simultaneous_accompanying_periods']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
$loader->load('services.yaml');
@@ -140,7 +143,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
}
$container->prependExtensionConfig('chill_custom_fields',
array('customizables_entities' =>
array('customizables_entities' =>
array(
array('class' => 'Chill\PersonBundle\Entity\Person', 'name' => 'PersonEntity')
)
@@ -152,7 +155,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
* @param ContainerBuilder $container
* @throws MissingBundleException
*/
public function prepend(ContainerBuilder $container)
public function prepend(ContainerBuilder $container)
{
$this->prependRoleHierarchy($container);
$this->prependHomepageWidget($container);
@@ -189,7 +192,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
/**
* Add a widget "add a person" on the homepage, automatically
*
*
* @param \Chill\PersonBundle\DependencyInjection\containerBuilder $container
*/
protected function prependHomepageWidget(containerBuilder $container)
@@ -208,7 +211,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
/**
* Add role hierarchy.
*
*
* @param ContainerBuilder $container
*/
protected function prependRoleHierarchy(ContainerBuilder $container)
@@ -217,7 +220,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'role_hierarchy' => array(
'CHILL_PERSON_UPDATE' => array('CHILL_PERSON_SEE'),
'CHILL_PERSON_CREATE' => array('CHILL_PERSON_SEE'),
PersonVoter::LISTS => [ ChillExportVoter::EXPORT ],
PersonVoter::LISTS => [ ChillExportVoter::EXPORT ],
PersonVoter::STATS => [ ChillExportVoter::EXPORT ]
)
));
@@ -225,7 +228,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
/**
* Add DQL function linked with person
*
*
* @param ContainerBuilder $container
*/
protected function prependDoctrineDQL(ContainerBuilder $container)