phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
LabeledIconTrait.php
Go to the documentation of this file.
1<?php
2
4
7
14
15 abstract public function addToProperty($name, $value, $separator=" ");
16 abstract public function addContent($content,$before=false);
17
25 public function addIcon($icon,$before=true,$labeled=false){
26 $iconO=$icon;
27 if(\is_string($icon)){
28 $iconO=new HtmlIcon("icon-".$this->identifier, $icon);
29 }
30 if($labeled!==false){
31 $direction=($before===true)?Direction::LEFT:Direction::RIGHT;
32 $this->addToProperty("class", $direction." labeled icon");
33 $this->tagName="div";
34 }
35 $this->addContent($iconO,$before);
36 return $iconO;
37 }
38}
addIcon($icon, $before=true, $labeled=false)
Adds an icon before or after.
addToProperty($name, $value, $separator=" ")
Semantic Icon component.
Definition HtmlIcon.php:14