コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function parseData($data)
 {
     $data = parent::parseData($data);
     if (is_array($data['value'])) {
         $data['value'] = array_map('intval', $data['value']);
     }
     return $data;
 }
コード例 #3
0
 /**
  * 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;
 }
コード例 #4
0
 /**
  * {@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]]);
 }
コード例 #5
0
 /**
  * {@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()]]);
 }
コード例 #6
0
 /**
  * {@inheritdoc}
  */
 protected function getFormOptions()
 {
     return array_merge(parent::getFormOptions(), ['choice_url' => 'pim_enrich_family_rest_index']);
 }