|
@@ 36-44 (lines=9) @@
|
| 33 |
|
return $this->addToProperty("class", $this->_baseClass); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
public function setVariations($variations) { |
| 37 |
|
$this->setProperty("class", $this->_baseClass); |
| 38 |
|
if (\is_string($variations)) |
| 39 |
|
$variations=\explode(" ", $variations); |
| 40 |
|
foreach ( $variations as $variation ) { |
| 41 |
|
$this->addVariation($variation); |
| 42 |
|
} |
| 43 |
|
return $this; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public function setState($state) { |
| 47 |
|
$this->setPropertyCtrl("class", $state, $this->_states); |
|
@@ 69-77 (lines=9) @@
|
| 66 |
|
return $this; |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
public function setStates($states) { |
| 70 |
|
$this->setProperty("class", $this->_baseClass); |
| 71 |
|
if (\is_string($states)) |
| 72 |
|
$states=\explode(" ", $states); |
| 73 |
|
foreach ( $states as $state ) { |
| 74 |
|
$this->addState($state); |
| 75 |
|
} |
| 76 |
|
return $this; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
public function addIcon($icon, $before=true) { |
| 80 |
|
return $this->addContent(new HtmlIcon("icon-" . $this->identifier, $icon), $before); |