/** * {@inheritdoc} */ public function prepareAttributesCollection(AttributeCollection $collection) { parent::prepareAttributesCollection($collection); $collection->add(new Attribute('sTranslatableId', $this->getOption('translatable_id'))); $collection->add(new Attribute('sNameField', $this->getOption('name_field'))); $collection->add(new Attribute('sGenerateRoute', $this->getOption('generate_route'))); }
/** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setRequired(['rows', 'cols']); $resolver->setDefaults(['rows' => 20, 'cols' => 50]); $resolver->setAllowedTypes('rows', 'int'); $resolver->setAllowedTypes('cols', 'int'); }
/** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setRequired(['minDate', 'maxDate']); $resolver->setDefaults(['minDate' => '', 'maxDate' => '', 'transformer' => new DateTransformer('Y-m-d')]); $resolver->setAllowedTypes('minDate', 'string'); $resolver->setAllowedTypes('maxDate', 'string'); }
/** * {@inheritdoc} */ public function prepareAttributesCollection(AttributeCollection $collection) { parent::prepareAttributesCollection($collection); $collection->add(new Attribute('iCols', $this->getOption('cols'))); $collection->add(new Attribute('iRows', $this->getOption('rows'))); }