Exemplo n.º 1
0
 public function addAction($action, $direction = Direction::RIGHT, $icon = NULL, $labeled = false)
 {
     $actionO = $action;
     if (\is_object($action) === false) {
         $actionO = new HtmlButton("action-" . $this->identifier, $action);
         if (isset($icon)) {
             $actionO->addIcon($icon, true, $labeled);
         }
     }
     $this->addToProperty("class", $direction . " action");
     $this->addContent($actionO, \strstr($direction, Direction::LEFT) !== false);
     return $actionO;
 }
Exemplo n.º 2
0
 public static function labeled($identifier, $value, $icon, $before = true)
 {
     $result = new HtmlButton($identifier, $value);
     $result->addIcon($icon, $before, true);
     return $result;
 }