Merge branch 'master' into VSR-issues

This commit is contained in:
2023-01-24 15:36:22 +01:00
201 changed files with 2768 additions and 708 deletions

View File

@@ -18,6 +18,7 @@ use Chill\MainBundle\Controller\CountryController;
use Chill\MainBundle\Controller\LanguageController;
use Chill\MainBundle\Controller\LocationController;
use Chill\MainBundle\Controller\LocationTypeController;
use Chill\MainBundle\Controller\RegroupmentController;
use Chill\MainBundle\Controller\UserController;
use Chill\MainBundle\Controller\UserJobApiController;
use Chill\MainBundle\Controller\UserJobController;
@@ -48,6 +49,7 @@ use Chill\MainBundle\Entity\Country;
use Chill\MainBundle\Entity\Language;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\LocationType;
use Chill\MainBundle\Entity\Regroupment;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserJob;
use Chill\MainBundle\Form\CivilityType;
@@ -55,6 +57,7 @@ use Chill\MainBundle\Form\CountryType;
use Chill\MainBundle\Form\LanguageType;
use Chill\MainBundle\Form\LocationFormType;
use Chill\MainBundle\Form\LocationTypeType;
use Chill\MainBundle\Form\RegroupmentType;
use Chill\MainBundle\Form\UserJobType;
use Chill\MainBundle\Form\UserType;
use Exception;
@@ -148,6 +151,11 @@ class ChillMainExtension extends Extension implements
$config['access_permissions_group_list']
);
$container->setParameter(
'chill_main.add_address',
$config['add_address']
);
$container->setParameter(
'chill_main.routing.resources',
$config['routing']['resources']
@@ -223,6 +231,7 @@ class ChillMainExtension extends Extension implements
'installation' => [
'name' => $config['installation_name'], ],
'available_languages' => $config['available_languages'],
'add_address' => $config['add_address'],
],
'form_themes' => ['@ChillMain/Form/fields.html.twig'],
];
@@ -493,6 +502,27 @@ class ChillMainExtension extends Extension implements
],
],
],
[
'class' => Regroupment::class,
'name' => 'regroupment',
'base_path' => '/admin/regroupment',
'form_class' => RegroupmentType::class,
'controller' => RegroupmentController::class,
'actions' => [
'index' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/Admin/Regroupment/index.html.twig',
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/Admin/Regroupment/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/Admin/Regroupment/edit.html.twig',
],
],
],
],
'apis' => [
[

View File

@@ -276,6 +276,16 @@ class Configuration implements ConfigurationInterface
->end() // end of root
;
$rootNode->children()
->arrayNode('add_address')->addDefaultsIfNotSet()->children()
->scalarNode('default_country')->cannotBeEmpty()->defaultValue('BE')->end()
->arrayNode('map_center')->children()
->scalarNode('x')->cannotBeEmpty()->defaultValue(50.8443)->end()
->scalarNode('y')->cannotBeEmpty()->defaultValue(4.3523)->end()
->scalarNode('z')->cannotBeEmpty()->defaultValue(15)->end()
->end()
->end();
return $treeBuilder;
}
}

View File

@@ -135,12 +135,8 @@ trait AddWidgetConfigurationTrait
/**
* add configuration nodes for the widget at the given place.
*
* @param type $place
*
* @return type
*/
protected function addWidgetsConfiguration($place, ContainerBuilder $containerBuilder)
protected function addWidgetsConfiguration(string $place, ContainerBuilder $containerBuilder)
{
$treeBuilder = new TreeBuilder($place);
$root = $treeBuilder->getRootNode($place)