widgets/JoyRide.php
public function renderStop($stop)
    {
        $options                 = array();
        $options['data-id']      = ArrayHelper::getValue($stop, 'id');
        $options['data-text']    = ArrayHelper::getValue($stop, 'text');
        $options['data-button']  = ArrayHelper::getValue($stop, 'button');
        $options['data-class']   = ArrayHelper::getValue($stop, 'class');
        $options['data-options'] = ArrayHelper::getValue($stop, 'options');
        if ($options['data-options'] !== null) {
            $config = array();
            foreach ($options['data-options'] as $key => $option) {
                $config[] = $key . ':' . $option;
            }
            $options['data-options'] = implode(';', $config);
        }
        $title = ArrayHelper::getValue($stop, 'title');
        if (!empty($title)) {
            $title = "<h4>{$title}</h4>";
        }
        $content = '<p>' . ArrayHelper::getValue($stop, 'body', '') . '</p>';

        return \CHtml::tag('li', $options, $title . $content);
    }
public function renderStop($stop)
    {
        $options                 = array();
        $options['data-id']      = ArrayHelper::getValue($stop, 'id');
        $options['data-text']    = ArrayHelper::getValue($stop, 'text');
        $options['data-button']  = ArrayHelper::getValue($stop, 'button');
        $options['data-class']   = ArrayHelper::getValue($stop, 'class');
        $options['data-options'] = ArrayHelper::getValue($stop, 'options');
        if ($options['data-options'] !== null) {
            $config = array();
            foreach ($options['data-options'] as $key => $option) {
                $config[] = $key . ':' . $option;
            }
            $options['data-options'] = implode(';', $config);
        }
        $title = ArrayHelper::getValue($stop, 'title');
        if (!empty($title)) {
            $title = "<h4>{$title}</h4>";
        }
        $content = '<p>' . ArrayHelper::getValue($stop, 'body', '') . '</p>';

        return \CHtml::tag('li', $options, $title . $content);
    }
public function renderStop ( $ stop ) { $ options = array ( ) ; $ options [ 'data-id' ] = ArrayHelper :: getValue ( $ stop , 'id' ) ; $ options [ 'data-text' ] = ArrayHelper :: getValue ( $ stop , 'text' ) ; $ options [ 'data-button' ] = ArrayHelper :: getValue ( $ stop , 'button' ) ; $ options [ 'data-class' ] = ArrayHelper :: getValue ( $ stop , 'class' ) ; $ options [ 'data-options' ] = ArrayHelper :: getValue ( $ stop , 'options' ) ; if ( $ options [ 'data-options' ] !== null ) { $ config = array ( ) ; foreach ( $ options [ 'data-options' ] as $ key => $ option ) { $ config [ ] = $ key . ':' . $ option ; } $ options [ 'data-options' ] = implode ( ';' , $ config ) ; } $ title = ArrayHelper :: getValue ( $ stop , 'title' ) ; if ( ! empty ( $ title ) ) { $ title = "<h4>{$title}</h4>" ; } $ content = '<p>' . ArrayHelper :: getValue ( $ stop , 'body' , '' ) . '</p>' ; return \ CHtml :: tag ( 'li' , $ options , $ title . $ content ) ; }
Renders a single stop
@param array $stop the stop configuration
@return string the resulting li tag
Renders a single stop