예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function preprocessVariables(Variables $variables, $hook, array $info)
 {
     if ($variables->theme_hook_original === 'links' && $variables->hasClass('operations')) {
         $variables->addClass('list-inline');
         foreach ($variables->links as &$data) {
             $link = Element::create($data['link']);
             $link->addClass(['btn', 'btn-sm']);
             $link->colorize();
             $link->setIcon();
             if ($this->theme->getSetting('tooltip_enabled')) {
                 $link->setAttribute('data-toggle', 'tooltip');
                 $link->setAttribute('data-placement', 'bottom');
             }
         }
     }
     $this->preprocessAttributes($variables, $hook, $info);
 }