sf4, setting new path for all config yaml files, and replace 'controller' path syntax in routes definitions

This commit is contained in:
Tchama 2020-08-03 13:04:54 +02:00
parent 1c9b38941f
commit 0a390eae98
19 changed files with 39 additions and 39 deletions

View File

@ -51,31 +51,31 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
$this->handlePersonFieldsParameters($container, $config['person_fields']); $this->handlePersonFieldsParameters($container, $config['person_fields']);
$this->handleAccompanyingPeriodsFieldsParameters($container, $config['accompanying_periods_fields']); $this->handleAccompanyingPeriodsFieldsParameters($container, $config['accompanying_periods_fields']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
$loader->load('services.yml'); $loader->load('services.yaml');
$loader->load('services/widgets.yml'); $loader->load('services/widgets.yaml');
$loader->load('services/exports.yml'); $loader->load('services/exports.yaml');
$loader->load('services/fixtures.yml'); $loader->load('services/fixtures.yaml');
$loader->load('services/controller.yml'); $loader->load('services/controller.yaml');
$loader->load('services/search.yml'); $loader->load('services/search.yaml');
$loader->load('services/menu.yml'); $loader->load('services/menu.yaml');
$loader->load('services/privacyEvent.yml'); $loader->load('services/privacyEvent.yaml');
$loader->load('services/command.yml'); $loader->load('services/command.yaml');
$loader->load('services/actions.yml'); $loader->load('services/actions.yaml');
$loader->load('services/form.yml'); $loader->load('services/form.yaml');
$loader->load('services/repository.yml'); $loader->load('services/repository.yaml');
$loader->load('services/templating.yml'); $loader->load('services/templating.yaml');
$loader->load('services/alt_names.yml'); $loader->load('services/alt_names.yaml');
// load service advanced search only if configure // load service advanced search only if configure
if ($config['search']['search_by_phone'] != 'never') { if ($config['search']['search_by_phone'] != 'never') {
$loader->load('services/search_by_phone.yml'); $loader->load('services/search_by_phone.yaml');
$container->setParameter('chill_person.search.search_by_phone', $container->setParameter('chill_person.search.search_by_phone',
$config['search']['search_by_phone']); $config['search']['search_by_phone']);
} }
if ($container->getParameter('chill_person.accompanying_period') !== 'hidden') { if ($container->getParameter('chill_person.accompanying_period') !== 'hidden') {
$loader->load('services/exports_accompanying_period.yml'); $loader->load('services/exports_accompanying_period.yaml');
} }
} }
@ -159,7 +159,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
$container->prependExtensionConfig('chill_main', array( $container->prependExtensionConfig('chill_main', array(
'routing' => array( 'routing' => array(
'resources' => array( 'resources' => array(
'@ChillPersonBundle/Resources/config/routing.yml' '@ChillPersonBundle/config/routes.yaml'
) )
) )
)); ));

View File

@ -1,30 +1,30 @@
chill_person_view: chill_person_view:
path: /{_locale}/person/{person_id}/general path: /{_locale}/person/{person_id}/general
defaults: { _controller: ChillPersonBundle:Person:view } controller: Chill\PersonBundle\Controller\PersonController::viewAction
chill_person_general_edit: chill_person_general_edit:
path: /{_locale}/person/{person_id}/general/edit path: /{_locale}/person/{person_id}/general/edit
defaults: {_controller: ChillPersonBundle:Person:edit } controller: Chill\PersonBundle\Controller\PersonController::editAction
chill_person_general_update: chill_person_general_update:
path: /{_locale}/person/{person_id}/general/update path: /{_locale}/person/{person_id}/general/update
defaults: {_controller: ChillPersonBundle:Person:update } controller: Chill\PersonBundle\Controller\PersonController::updateAction
chill_person_new: chill_person_new:
path: /{_locale}/person/new path: /{_locale}/person/new
defaults: {_controller: ChillPersonBundle:Person:new } controller: Chill\PersonBundle\Controller\PersonController::newAction
chill_person_review: chill_person_review:
path: /{_locale}/person/review path: /{_locale}/person/review
defaults: {_controller: ChillPersonBundle:Person:review } controller: Chill\PersonBundle\Controller\PersonController::reviewAction
chill_person_create: chill_person_create:
path: /{_locale}/person/create path: /{_locale}/person/create
defaults: {_controller: ChillPersonBundle:Person:create } controller: Chill\PersonBundle\Controller\PersonController::createAction
chill_person_search: chill_person_search:
path: /{_locale}/person/search path: /{_locale}/person/search
defaults: { _controller: ChillPersonBundle:Person:search } controller: Chill\PersonBundle\Controller\PersonController::searchAction
options: options:
menus: menus:
main: main:
@ -33,52 +33,52 @@ chill_person_search:
chill_person_accompanying_period_list: chill_person_accompanying_period_list:
path: /{_locale}/person/{person_id}/accompanying-period path: /{_locale}/person/{person_id}/accompanying-period
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:list } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::listAction
chill_person_accompanying_period_create: chill_person_accompanying_period_create:
path: /{_locale}/person/{person_id}/accompanying-period/create path: /{_locale}/person/{person_id}/accompanying-period/create
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:create } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::createAction
chill_person_accompanying_period_update: chill_person_accompanying_period_update:
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/update path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/update
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:update } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::updateAction
chill_person_accompanying_period_close: chill_person_accompanying_period_close:
path: /{_locale}/person/{person_id}/accompanying-period/close path: /{_locale}/person/{person_id}/accompanying-period/close
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:close } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::closeAction
chill_person_accompanying_period_open: chill_person_accompanying_period_open:
path: /{_locale}/person/{person_id}/accompanying-period/open path: /{_locale}/person/{person_id}/accompanying-period/open
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:open } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::openAction
chill_person_accompanying_period_re_open: chill_person_accompanying_period_re_open:
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:reOpen } controller: Chill\PersonBundle\Controller\AccompanyingPeriodController::reOpenAction
chill_person_address_list: chill_person_address_list:
path: /{_locale}/person/{person_id}/address/list path: /{_locale}/person/{person_id}/address/list
defaults: { _controller: ChillPersonBundle:PersonAddress:list } controller: Chill\PersonBundle\Controller\PersonAddressController::listAction
chill_person_address_create: chill_person_address_create:
path: /{_locale}/person/{person_id}/address/create path: /{_locale}/person/{person_id}/address/create
defaults: { _controller: ChillPersonBundle:PersonAddress:create } controller: Chill\PersonBundle\Controller\PersonAddressController::createAction
methods: [POST] methods: [POST]
chill_person_address_new: chill_person_address_new:
path: /{_locale}/person/{person_id}/address/new path: /{_locale}/person/{person_id}/address/new
defaults: { _controller: ChillPersonBundle:PersonAddress:new } controller: Chill\PersonBundle\Controller\PersonAddressController::newAction
chill_person_address_edit: chill_person_address_edit:
path: /{_locale}/person/{person_id}/address/{address_id}/edit path: /{_locale}/person/{person_id}/address/{address_id}/edit
defaults: { _controller: ChillPersonBundle:PersonAddress:edit } controller: Chill\PersonBundle\Controller\PersonAddressController::editAction
chill_person_address_update: chill_person_address_update:
path: /{_locale}/person/{person_id}/address/{address_id}/update path: /{_locale}/person/{person_id}/address/{address_id}/update
defaults: { _controller: ChillPersonBundle:PersonAddress:update } controller: Chill\PersonBundle\Controller\PersonAddressController::updateAction
chill_person_timeline: chill_person_timeline:
path: /{_locale}/person/{person_id}/timeline path: /{_locale}/person/{person_id}/timeline
defaults: { _controller: ChillPersonBundle:TimelinePerson:person } controller: Chill\PersonBundle\Controller\TimelinePersonController::personAction
options: options:
menus: menus:
person: person:
@ -87,4 +87,4 @@ chill_person_timeline:
chill_person_admin: chill_person_admin:
path: "/{_locale}/admin/person" path: "/{_locale}/admin/person"
defaults: { _controller: ChillPersonBundle:Admin:index } controller: Chill\PersonBundle\Controller\AdminController::indexAction

View File

@ -1,4 +1,4 @@
services: services:
Chill\PersonBundle\DataFixtures\ORM\: Chill\PersonBundle\DataFixtures\ORM\:
resource: ../../../DataFixtures/ORM resource: ../../DataFixtures/ORM
tags: [ 'doctrine.fixture.orm' ] tags: [ 'doctrine.fixture.orm' ]