From fb9dbdb236d532820d8924131ef1576559abb892 Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Fri, 24 May 2013 01:29:41 +0400 Subject: [PATCH] Cosmetic code move --- framework/yii/jui/Accordion.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/framework/yii/jui/Accordion.php b/framework/yii/jui/Accordion.php index a4bae15..6c5dd97 100644 --- a/framework/yii/jui/Accordion.php +++ b/framework/yii/jui/Accordion.php @@ -82,17 +82,13 @@ class Accordion extends Widget if (!isset($item['header'])) { throw new InvalidConfigException("The 'header' option is required."); } - - $headerOptions = ArrayHelper::getValue($item, 'headerOptions', array()); - $sections[] = Html::tag('h3', $item['header'], $headerOptions); - if (!isset($item['content'])) { throw new InvalidConfigException("The 'content' option is required."); } - + $headerOptions = ArrayHelper::getValue($item, 'headerOptions', array()); + $sections[] = Html::tag('h3', $item['header'], $headerOptions); $options = ArrayHelper::getValue($item, 'options', array()); $sections[] = Html::tag('div', $item['content'], $options);; - } return implode("\n", $sections);