|
|
@ -44,6 +44,10 @@ use yii\helpers\ArrayHelper; |
|
|
|
* 'label' => 'DropdownB', |
|
|
|
* 'label' => 'DropdownB', |
|
|
|
* 'content' => 'DropdownB, Anim pariatur cliche...', |
|
|
|
* 'content' => 'DropdownB, Anim pariatur cliche...', |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
|
|
|
|
* [ |
|
|
|
|
|
|
|
* 'label' => 'External Link', |
|
|
|
|
|
|
|
* 'url' => 'http://www.example.com', |
|
|
|
|
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ], |
|
|
|
* ], |
|
|
@ -240,8 +244,11 @@ class Tabs extends Widget |
|
|
|
if (isset($item['visible']) && !$item['visible']) { |
|
|
|
if (isset($item['visible']) && !$item['visible']) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!array_key_exists('content', $item)) { |
|
|
|
if (!(array_key_exists('content', $item) xor array_key_exists('url', $item))) { |
|
|
|
throw new InvalidConfigException("The 'content' option is required."); |
|
|
|
throw new InvalidConfigException("Either the 'content' or the 'url' option is required."); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (array_key_exists('url', $item)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$content = ArrayHelper::remove($item, 'content'); |
|
|
|
$content = ArrayHelper::remove($item, 'content'); |
|
|
|