widgets/Section.php
public function renderItem($item)
    {
        $sectionItem   = array();
        $sectionItem[] = \CHtml::tag(
            'p',
            array('class' => 'title', 'data-section-title' => 'data-section-title'),
            \CHtml::link(ArrayHelper::getValue($item, 'label', 'Section Title'), '#')
        );
        $options       = ArrayHelper::getValue($item, 'options', array());
        Html::addCssClass($options, 'content');
        ArrayHelper::addValue('data-section-content', 'data-section-content', $options);
        $sectionOptions = array();
        if (ArrayHelper::getValue($item, 'active')) {
            ArrayHelper::addValue('class', 'active', $sectionOptions);
        }
        $sectionItem[] = \CHtml::tag('div', $options, ArrayHelper::getValue($item, 'content', 'Section Content'));
        return \CHtml::tag('section', $sectionOptions, implode("\n", $sectionItem));
    }
public function renderItem($item)
    {
        $sectionItem   = array();
        $sectionItem[] = \CHtml::tag(
            'p',
            array('class' => 'title', 'data-section-title' => 'data-section-title'),
            \CHtml::link(ArrayHelper::getValue($item, 'label', 'Section Title'), '#')
        );
        $options       = ArrayHelper::getValue($item, 'options', array());
        Html::addCssClass($options, 'content');
        ArrayHelper::addValue('data-section-content', 'data-section-content', $options);
        $sectionOptions = array();
        if (ArrayHelper::getValue($item, 'active')) {
            ArrayHelper::addValue('class', 'active', $sectionOptions);
        }
        $sectionItem[] = \CHtml::tag('div', $options, ArrayHelper::getValue($item, 'content', 'Section Content'));
        return \CHtml::tag('section', $sectionOptions, implode("\n", $sectionItem));
    }
public function renderItem ( $ item ) { $ sectionItem = array ( ) ; $ sectionItem [ ] = \ CHtml :: tag ( 'p' , array ( 'class' => 'title' , 'data-section-title' => 'data-section-title' ) , \ CHtml :: link ( ArrayHelper :: getValue ( $ item , 'label' , 'Section Title' ) , '#' ) ) ; $ options = ArrayHelper :: getValue ( $ item , 'options' , array ( ) ) ; Html :: addCssClass ( $ options , 'content' ) ; ArrayHelper :: addValue ( 'data-section-content' , 'data-section-content' , $ options ) ; $ sectionOptions = array ( ) ; if ( ArrayHelper :: getValue ( $ item , 'active' ) ) { ArrayHelper :: addValue ( 'class' , 'active' , $ sectionOptions ) ; } $ sectionItem [ ] = \ CHtml :: tag ( 'div' , $ options , ArrayHelper :: getValue ( $ item , 'content' , 'Section Content' ) ) ; return \ CHtml :: tag ( 'section' , $ sectionOptions , implode ( "\n" , $ sectionItem ) ) ; }
Renders a section item
@param array $item the section item
@return string the section result
Renders a section item