Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function preprocessElement(Variables $variables, $hook, array $info)
 {
     $variables->element->colorize();
     $variables->element->setIcon($variables->element->getProperty('icon'));
     $variables['icon_only'] = $variables->element->getProperty('icon_only');
     $variables['label'] = $variables->element->getProperty('value');
     parent::preprocessElement($variables, $hook, $info);
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function preprocessElement(Element $element, Variables $variables)
 {
     $element->colorize();
     $element->setButtonSize();
     $element->setIcon($element->getProperty('icon'));
     $variables['icon_only'] = $element->getProperty('icon_only');
     $variables['label'] = $element->getProperty('value');
     if ($element->getProperty('split')) {
         $variables->map([$variables::SPLIT_BUTTON]);
     }
     parent::preprocessElement($element, $variables);
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 public function preprocessElement(Variables $variables, $hook, array $info)
 {
     $variables->element->colorize();
     $variables->element->setButtonSize();
     $variables->element->setIcon($variables->element->getProperty('icon'));
     $variables['icon_only'] = $variables->element->getProperty('icon_only');
     $variables['label'] = $variables->element->getProperty('value');
     if ($variables->element->getProperty('split')) {
         $variables->map([$variables::SPLIT_BUTTON]);
     }
     parent::preprocessElement($variables, $hook, $info);
 }