@@ 49-57 (lines=9) @@ | ||
46 | return $this->_self->addToProperty("class", $this->_self->getBaseClass()); |
|
47 | } |
|
48 | ||
49 | public function setVariations($variations) { |
|
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); |
|
55 | } |
|
56 | return $this; |
|
57 | } |
|
58 | ||
59 | public function setState($state) { |
|
60 | $this->_self->setPropertyCtrl("class", $state, $this->_self->getStates()); |
|
@@ 82-90 (lines=9) @@ | ||
79 | return $this; |
|
80 | } |
|
81 | ||
82 | public function setStates($states) { |
|
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); |
|
88 | } |
|
89 | return $this; |
|
90 | } |
|
91 | ||
92 | public function addIcon($icon, $before=true) { |
|
93 | return $this->_self->addContent(new HtmlIcon("icon-" . $this->_self->getIdentifier(), $icon), $before); |