Move AccompanyingPeriodType, remove custom definition.

This commit is contained in:
Pol Dellaiera 2021-05-06 21:31:04 +02:00
parent 92b6f4e206
commit a9bdb1fe3b
3 changed files with 12 additions and 24 deletions

View File

@ -23,12 +23,6 @@ services:
tags:
- { name: form.type, alias: closing_motive }
Chill\PersonBundle\Form\AccompanyingPeriodType:
arguments:
$config: "%chill_person.accompanying_period_fields%"
tags:
- { name: form.type }
chill.person.form.type.pick_person:
class: Chill\PersonBundle\Form\Type\PickPersonType
arguments:

View File

@ -26,7 +26,7 @@ use Chill\PersonBundle\Privacy\PrivacyEvent;
use Doctrine\DBAL\Exception;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Form\AccompanyingPeriodType;
use Chill\PersonBundle\Form\Type\AccompanyingPeriodType;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\Common\Collections\Criteria;
use Chill\PersonBundle\Security\Authorization\PersonVoter;

View File

@ -1,6 +1,6 @@
<?php
namespace Chill\PersonBundle\Form;
namespace Chill\PersonBundle\Form\Type;
use Chill\MainBundle\Entity\Center;
use Symfony\Component\Form\AbstractType;
@ -14,12 +14,10 @@ use Chill\PersonBundle\Security\Authorization\PersonVoter;
use Chill\MainBundle\Form\Type\UserPickerType;
use Symfony\Component\Security\Core\Role\Role;
use Chill\PersonBundle\Form\Type\ClosingMotivePickerType;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* Class AccompanyingPeriodType
*
* @package Chill\PersonBundle\Form
*/
class AccompanyingPeriodType extends AbstractType
{
@ -33,13 +31,9 @@ class AccompanyingPeriodType extends AbstractType
*/
protected $config = [];
/**
*
* @param string[] $config configuration of visibility of some fields
*/
public function __construct(array $config)
public function __construct(ParameterBagInterface $parameterBag)
{
$this->config = $config;
$this->config = $parameterBag->get('chill_person.accompanying_period_fields');
}
/**