mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix sf4 error with PickPersonType (error in commit a92686d1)
This commit is contained in:
parent
43dedaf96b
commit
9952a885ed
@ -31,7 +31,7 @@ use Chill\MainBundle\Entity\GroupCenter;
|
|||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
use Chill\MainBundle\Entity\Center;
|
use Chill\MainBundle\Entity\Center;
|
||||||
use Chill\PersonBundle\Entity\PersonRepository;
|
use Chill\PersonBundle\Repository\PersonRepository;
|
||||||
use Chill\PersonBundle\Search\PersonSearch;
|
use Chill\PersonBundle\Search\PersonSearch;
|
||||||
use Symfony\Component\Translation\TranslatorInterface;
|
use Symfony\Component\Translation\TranslatorInterface;
|
||||||
use Chill\PersonBundle\Form\ChoiceLoader\PersonChoiceLoader;
|
use Chill\PersonBundle\Form\ChoiceLoader\PersonChoiceLoader;
|
||||||
@ -55,7 +55,11 @@ use Symfony\Component\OptionsResolver\Options;
|
|||||||
*/
|
*/
|
||||||
class PickPersonType extends AbstractType
|
class PickPersonType extends AbstractType
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var PersonRepository
|
||||||
|
*/
|
||||||
|
protected $personRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var \Chill\MainBundle\Entity\User
|
* @var \Chill\MainBundle\Entity\User
|
||||||
@ -81,6 +85,7 @@ class PickPersonType extends AbstractType
|
|||||||
protected $translator;
|
protected $translator;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
PersonRepository $personRepository,
|
||||||
TokenStorageInterface $tokenStorage,
|
TokenStorageInterface $tokenStorage,
|
||||||
AuthorizationHelper $authorizationHelper,
|
AuthorizationHelper $authorizationHelper,
|
||||||
UrlGeneratorInterface $urlGenerator,
|
UrlGeneratorInterface $urlGenerator,
|
||||||
|
@ -32,6 +32,7 @@ services:
|
|||||||
chill.person.form.type.pick_person:
|
chill.person.form.type.pick_person:
|
||||||
class: Chill\PersonBundle\Form\Type\PickPersonType
|
class: Chill\PersonBundle\Form\Type\PickPersonType
|
||||||
arguments:
|
arguments:
|
||||||
|
- "@chill.person.repository.person"
|
||||||
- "@security.token_storage"
|
- "@security.token_storage"
|
||||||
- "@chill.main.security.authorization.helper"
|
- "@chill.main.security.authorization.helper"
|
||||||
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
|
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
Chill\PersonBundle\Repository\PersonRepository:
|
chill.person.repository.person:
|
||||||
class: Chill\PersonBundle\Person\PersonRepository
|
class: Chill\PersonBundle\Repository\PersonRepository
|
||||||
factory: ['@doctrine.orm.entity_manager', getRepository]
|
factory: ['@doctrine.orm.entity_manager', getRepository]
|
||||||
arguments:
|
arguments:
|
||||||
- 'Chill\PersonBundle\Entity\Person'
|
- 'Chill\PersonBundle\Entity\Person'
|
||||||
|
Chill\PersonBundle\Repository\PersonRepository: '@chill.person.repository.person'
|
||||||
|
|
||||||
Chill\PersonBundle\Repository\ClosingMotiveRepository:
|
Chill\PersonBundle\Repository\ClosingMotiveRepository:
|
||||||
class: Chill\PersonBundle\Repository\ClosingMotiveRepository
|
class: Chill\PersonBundle\Repository\ClosingMotiveRepository
|
||||||
|
@ -2,6 +2,7 @@ services:
|
|||||||
chill_person.widget.person_list:
|
chill_person.widget.person_list:
|
||||||
class: Chill\PersonBundle\Widget\PersonListWidget
|
class: Chill\PersonBundle\Widget\PersonListWidget
|
||||||
arguments:
|
arguments:
|
||||||
|
- "@chill.person.repository.person"
|
||||||
- "@doctrine.orm.entity_manager"
|
- "@doctrine.orm.entity_manager"
|
||||||
- "@chill.main.security.authorization.helper"
|
- "@chill.main.security.authorization.helper"
|
||||||
- "@security.token_storage"
|
- "@security.token_storage"
|
||||||
|
@ -41,6 +41,12 @@ use Chill\CustomFieldsBundle\Entity\CustomField;
|
|||||||
*/
|
*/
|
||||||
class PersonListWidget implements WidgetInterface
|
class PersonListWidget implements WidgetInterface
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Repository for persons
|
||||||
|
*
|
||||||
|
* @var EntityRepository
|
||||||
|
*/
|
||||||
|
protected $personRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The entity manager
|
* The entity manager
|
||||||
@ -69,6 +75,7 @@ class PersonListWidget implements WidgetInterface
|
|||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
EntityRepository $personRepostory,
|
||||||
EntityManager $em,
|
EntityManager $em,
|
||||||
AuthorizationHelper $authorizationHelper,
|
AuthorizationHelper $authorizationHelper,
|
||||||
TokenStorage $tokenStorage
|
TokenStorage $tokenStorage
|
||||||
|
Loading…
x
Reference in New Issue
Block a user