Example #1
0
 /**
  * {@inheritdoc}
  */
 public function prepareAttributesCollection(AttributeCollection $collection)
 {
     parent::prepareAttributesCollection($collection);
     $collection->add(new Attribute('sTip', $this->getOption('tip')));
     $collection->add(new Attribute('sDirection', $this->getOption('direction')));
     $collection->add(new Attribute('sShortTip', $this->getOption('short_tip')));
     $collection->add(new Attribute('sDefaultState', $this->getOption('default_state')));
     $collection->add(new Attribute('bRetractable', $this->getOption('retractable'), Attribute::TYPE_BOOLEAN));
 }
 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['icon' => '']);
     $resolver->setAllowedTypes('icon', 'string');
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function prepareAttributesCollection(AttributeCollection $collection)
 {
     parent::prepareAttributesCollection($collection);
     $collection->add(new Attribute('sText', $this->getOption('text')));
 }