32 abstract public function addContent($content,$before=
false);
37 return $this->_self->addToPropertyCtrlCheck(
"class", $variation, $this->_self->getVariations());
41 return $this->_self->addToPropertyCtrlCheck(
"class", $state, $this->_self->getStates());
45 $this->_self->setPropertyCtrl(
"class", $variation, $this->_self->getVariations());
46 return $this->_self->addToProperty(
"class", $this->_self->getBaseClass());
50 $this->_self->setProperty(
"class", $this->_self->getBaseClass());
51 if (\is_string($variations))
52 $variations=\explode(
" ", $variations);
53 foreach ( $variations as $variation ) {
54 $this->_self->addVariation($variation);
60 $this->_self->setPropertyCtrl(
"class", $state, $this->_self->getStates());
61 return $this->_self->addToProperty(
"class", $this->_self->getBaseClass());
65 if (\is_string($variations))
66 $variations=\explode(
" ", $variations);
67 foreach ( $variations as $variation ) {
68 $this->_self->addVariation($variation);
74 if (\is_string($states))
75 $states=\explode(
" ", $states);
76 foreach ( $states as $state ) {
77 $this->_self->addState($state);
83 $this->_self->setProperty(
"class", $this->_self->getBaseClass());
84 if (\is_string($states))
85 $states=\explode(
" ", $states);
86 foreach ( $states as $state ) {
87 $this->_self->addState($state);
92 public function addIcon($icon, $before=
true) {
93 return $this->_self->addContent(
new HtmlIcon(
"icon-" . $this->_self->getIdentifier(), $icon), $before);
97 $this->_self->onCreate(
"$('#".$this->_self->getIdentifier().
"').sticky({ context: '".$context.
"'});");
118 $this->_self->addToProperty(
"class",
"disabled");
136 return $this->_self->addToProperty(
"class",
"fluid");
144 return $this->_self->addToProperty(
"class",
"header");
153 $this->_self->addToProperty(
"class",
"active");
159 $this->_self->addToPropertyCtrl(
"class",
"attached", array (
"attached" ));
167 if($recursive===
true){
168 $content=$this->_self->getContent();
170 $content->setInverted($recursive);
171 elseif(\is_array($content) || $content instanceof \Traversable){
172 foreach ($content as $elm){
174 $elm->setInverted($recursive);
179 return $this->_self->addToProperty(
"class",
"inverted");
183 return $this->_self->addToProperty(
"class",
"circular");
191 return $this->_self->setFloated();
195 return $this->_self->setFloated(
"left");
202 protected function addBehavior(&$array,$key,$value,$before=
"",$after=
""){
203 if(\is_string($value)){
204 if(isset($array[$key])){
205 $p=JString::replaceAtFirstAndLast($array[$key], $before,
"", $after,
"");
206 $array[$key]=$before.$p.$value.$after;
208 $array[$key]=$before.$value.$after;
static getConstantValues($postFix="", $prefixBefore=false)
Base class for Semantic double elements.
addBehavior(&$array, $key, $value, $before="", $after="")
setFloated($direction="right")
setActive($value=true)
show it is currently the active user selection
addSticky($context="body")
setDisabled($disable=true)
show it is currently unable to be interacted with
addIcon($icon, $before=true)
setInverted($recursive=true)
can be formatted to appear on dark backgrounds
addToProperty($name, $value, $separator=" ")
addVariations($variations=array())
setVariations($variations)
addToPropertyCtrl($name, $value, $typeCtrl)
addContent($content, $before=false)
addToPropertyCtrlCheck($name, $value, $typeCtrl)
setProperty($name, $value)
setPropertyCtrl($name, $value, $typeCtrl)
addStates($states=array())