phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
LabeledIconTrait.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\base\traits
;
4
5
use
Ajax\semantic\html\elements\HtmlIcon
;
6
use
Ajax\semantic\html\base\constants\Direction
;
7
13
trait
LabeledIconTrait
{
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
}
Direction
HtmlIcon
Ajax\semantic\html\elements\HtmlIcon
Semantic Icon component.
Definition:
HtmlIcon.php:14
Ajax\semantic\html\base\traits\addToProperty
addToProperty($name, $value, $separator=" ")
Definition:
BaseHtmlPropertiesTrait.php:46
Ajax\semantic\html\base\constants\Direction\RIGHT
const RIGHT
Definition:
Direction.php:5
Ajax\semantic\html\base\traits
Definition:
AttachedTrait.php:3
LabeledIconTrait
Ajax\semantic\html\base\traits\addIcon
addIcon($icon, $before=true)
Definition:
BaseTrait.php:92
Ajax\semantic\html\base\constants\Direction\LEFT
const LEFT
Definition:
Direction.php:5
Ajax\semantic\html\base\traits\addContent
addContent($content, $before=false)
Ajax
semantic
html
base
traits
LabeledIconTrait.php
Generated on Thu Sep 19 2024 23:26:03 for
phpMv-UI
by
doxygen
1.8.13