mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 07:19:49 +00:00
add CenterResolverDispatcher in construct, was missing
This commit is contained in:
parent
0d35dfc303
commit
e488d6dadf
@ -41,11 +41,13 @@ class PersonDocumentType extends AbstractType
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
TranslatableStringHelperInterface $translatableStringHelper,
|
TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
ScopeResolverDispatcher $scopeResolverDispatcher,
|
ScopeResolverDispatcher $scopeResolverDispatcher,
|
||||||
ParameterBagInterface $parameterBag
|
ParameterBagInterface $parameterBag,
|
||||||
|
CenterResolverDispatcher $centerResolverDispatcher
|
||||||
) {
|
) {
|
||||||
$this->translatableStringHelper = $translatableStringHelper;
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
$this->scopeResolverDispatcher = $scopeResolverDispatcher;
|
$this->scopeResolverDispatcher = $scopeResolverDispatcher;
|
||||||
$this->parameterBag = $parameterBag;
|
$this->parameterBag = $parameterBag;
|
||||||
|
$this->centerResolverDispatcher = $centerResolverDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
@ -76,6 +78,11 @@ class PersonDocumentType extends AbstractType
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) {
|
if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) {
|
||||||
|
/* dump($isScopeConcerned);
|
||||||
|
dump($this->parameterBag->get('chill_main')['acl']['form_show_scopes']);
|
||||||
|
|
||||||
|
dump($this->centerResolverDispatcher)*/
|
||||||
|
|
||||||
$builder->add('scope', ScopePickerType::class, [
|
$builder->add('scope', ScopePickerType::class, [
|
||||||
'center' => $this->centerResolverDispatcher->resolveCenter($document),
|
'center' => $this->centerResolverDispatcher->resolveCenter($document),
|
||||||
'role' => $options['role'],
|
'role' => $options['role'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user