/**
  *
  * {@inheritdoc}
  *
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     /* set the default option value for this kind of compound field */
     parent::configureOptions($resolver);
     $resolver->setDefaults(array('firstLevelOnly' => false, 'types' => [], 'mapping' => [], 'choice_loader' => function (Options $options) {
         return $this->choiceListFactory->createLoader($options->offsetGet('mapping'), $options->offsetGet('types'), $options->offsetGet('firstLevelOnly'));
     }, 'choice_label' => function ($value, $key, $index) {
         return $value->getLabel();
     }, 'group_by' => function ($value, $key, $index) {
         return null;
     }, 'choice_value' => function ($value) {
         return $value->getValue();
     }, 'multiple' => false));
 }
 public function __construct()
 {
     parent::__construct();
     $this->viewTypes = array();
 }
Beispiel #3
0
 public function getDefaultOptions($name)
 {
     return ['displayOptions' => ['label' => SelectPickerType::humanize($name), 'class' => 'col-md-12'], 'mappingOptions' => [], 'restrictionOptions' => [], 'extraOptions' => []];
 }
Beispiel #4
0
 public function __construct(UserService $userService)
 {
     parent::__construct();
     $this->userService = $userService;
 }
 public function __construct()
 {
     parent::__construct();
     $this->dataFieldTypes = array();
 }