|
|
|
@ -94,7 +94,7 @@ class Collapse extends Widget
|
|
|
|
|
$items = []; |
|
|
|
|
$index = 0; |
|
|
|
|
foreach ($this->items as $item) { |
|
|
|
|
if (!isset($item['label'])) { |
|
|
|
|
if (!array_key_exists('label', $item)) { |
|
|
|
|
throw new InvalidConfigException("The 'label' option is required."); |
|
|
|
|
} |
|
|
|
|
$header = $item['label']; |
|
|
|
@ -116,7 +116,7 @@ class Collapse extends Widget
|
|
|
|
|
*/ |
|
|
|
|
public function renderItem($header, $item, $index) |
|
|
|
|
{ |
|
|
|
|
if (isset($item['content'])) { |
|
|
|
|
if (array_key_exists('content', $item)) { |
|
|
|
|
$id = $this->options['id'] . '-collapse' . $index; |
|
|
|
|
$options = ArrayHelper::getValue($item, 'contentOptions', []); |
|
|
|
|
$options['id'] = $id; |
|
|
|
|