@@ -10,6 +10,9 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | protected $params=array(); |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param string $identifier |
|
| 15 | + */ |
|
| 13 | 16 | public function __construct( $identifier, $tagName="div", $baseClass="ui"){ |
| 14 | 17 | parent::__construct( $identifier, "div", "ui accordion"); |
| 15 | 18 | } |
@@ -29,6 +32,9 @@ discard block |
||
| 29 | 32 | return ($value instanceof HtmlAccordionItem)===false; |
| 30 | 33 | } |
| 31 | 34 | |
| 35 | + /** |
|
| 36 | + * @param string $title |
|
| 37 | + */ |
|
| 32 | 38 | public function addPanel($title,$content){ |
| 33 | 39 | return $this->addItem([$title,$content]); |
| 34 | 40 | } |
@@ -165,8 +165,9 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
| 167 | 167 | foreach ( $this->content as $element ) { |
| 168 | - if ($element->getProperty($this->attr) != NULL) |
|
| 169 | - $element->_ajaxOn($operation, $event, $url, $responseElement, $parameters); |
|
| 168 | + if ($element->getProperty($this->attr) != NULL) { |
|
| 169 | + $element->_ajaxOn($operation, $event, $url, $responseElement, $parameters); |
|
| 170 | + } |
|
| 170 | 171 | } |
| 171 | 172 | return $this; |
| 172 | 173 | } |
@@ -180,9 +181,9 @@ discard block |
||
| 180 | 181 | protected function createItem($value) { |
| 181 | 182 | $count=$this->count(); |
| 182 | 183 | $itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section"); |
| 183 | - if (\is_array($value)) |
|
| 184 | - $itemO->fromArray($value); |
|
| 185 | - else { |
|
| 184 | + if (\is_array($value)) { |
|
| 185 | + $itemO->fromArray($value); |
|
| 186 | + } else { |
|
| 186 | 187 | $itemO->setContent($value); |
| 187 | 188 | } |
| 188 | 189 | return $itemO; |