/** * Constructor * * @param FormFactoryInterface $factory * @param ProductFilterUtility $util * @param UserContext $userContext * @param string $optionRepoClass * @param AttributeRepositoryInterface $attributeRepository */ public function __construct(FormFactoryInterface $factory, ProductFilterUtility $util, UserContext $userContext, $optionRepoClass, AttributeRepositoryInterface $attributeRepository) { parent::__construct($factory, $util); $this->userContext = $userContext; $this->optionRepoClass = $optionRepoClass; $this->attributeRepository = $attributeRepository; }
/** * {@inheritdoc} */ protected function parseData($data) { $data = parent::parseData($data); if (is_array($data['value'])) { $data['value'] = array_map('intval', $data['value']); } return $data; }
/** * Constructor * * @param FormFactoryInterface $factory * @param ProductFilterUtility $util * @param UserContext $userContext * @param string $groupClass */ public function __construct(FormFactoryInterface $factory, ProductFilterUtility $util, UserContext $userContext, $groupClass) { parent::__construct($factory, $util); $this->userContext = $userContext; $this->groupClass = $groupClass; }
/** * {@inheritdoc} */ protected function getFormOptions() { return array_merge(parent::getFormOptions(), ['choice_url' => 'pim_ui_ajaxentity_list', 'choice_url_params' => ['class' => $this->groupClass, 'dataLocale' => $this->userContext->getCurrentLocaleCode(), 'collectionId' => null]]); }
/** * {@inheritdoc} */ protected function getFormOptions() { $attribute = $this->getAttribute(); return array_merge(parent::getFormOptions(), ['choice_url' => 'pim_ui_ajaxentity_list', 'choice_url_params' => ['class' => $this->optionRepoClass, 'dataLocale' => $this->userContext->getCurrentLocaleCode(), 'collectionId' => $attribute->getId()]]); }
/** * {@inheritdoc} */ protected function getFormOptions() { return array_merge(parent::getFormOptions(), ['choice_url' => 'pim_enrich_family_rest_index']); }