public static function renderControlGroup($model, $form, $name, $data)
    {
        if (isset($data['model'])) {
            $model = $data['model'];
        }
        $field = $form->field($model, $name);
        if (isset($data['formMethod'])) {
            if (is_string($data['formMethod'])) {
                echo call_user_func_array([$field, $data['formMethod']], $data['arguments']);
            } else {
                echo call_user_func($data['formMethod'], $field, $data['arguments']);
            }
            return;
        }
        if (isset($data['options']['label'])) {
            $label = $data['options']['label'];
            unset($data['options']['label']);
        } else {
            $label = $model->getAttributeLabel($name);
        }
        echo $field
                ->label($label, ['class' => 'control-label'])
                ->error(['class' => 'help-block'])
                ->widget($data['widgetClass'], $data['options']);
        return;
    }
public static function renderControlGroup($model, $form, $name, $data)
    {
        if (isset($data['model'])) {
            $model = $data['model'];
        }
        $field = $form->field($model, $name);
        if (isset($data['formMethod'])) {
            if (is_string($data['formMethod'])) {
                echo call_user_func_array([$field, $data['formMethod']], $data['arguments']);
            } else {
                echo call_user_func($data['formMethod'], $field, $data['arguments']);
            }
            return;
        }
        if (isset($data['options']['label'])) {
            $label = $data['options']['label'];
            unset($data['options']['label']);
        } else {
            $label = $model->getAttributeLabel($name);
        }
        echo $field
                ->label($label, ['class' => 'control-label'])
                ->error(['class' => 'help-block'])
                ->widget($data['widgetClass'], $data['options']);
        return;
    }
public static function renderControlGroup ( $ model , $ form , $ name , $ data ) { if ( isset ( $ data [ 'model' ] ) ) { $ model = $ data [ 'model' ] ; } $ field = $ form -> field ( $ model , $ name ) ; if ( isset ( $ data [ 'formMethod' ] ) ) { if ( is_string ( $ data [ 'formMethod' ] ) ) { echo call_user_func_array ( [ $ field , $ data [ 'formMethod' ] ] , $ data [ 'arguments' ] ) ; } else { echo call_user_func ( $ data [ 'formMethod' ] , $ field , $ data [ 'arguments' ] ) ; } return ; } if ( isset ( $ data [ 'options' ] [ 'label' ] ) ) { $ label = $ data [ 'options' ] [ 'label' ] ; unset ( $ data [ 'options' ] [ 'label' ] ) ; } else { $ label = $ model -> getAttributeLabel ( $ name ) ; } echo $ field -> label ( $ label , [ 'class' => 'control-label' ] ) -> error ( [ 'class' => 'help-block' ] ) -> widget ( $ data [ 'widgetClass' ] , $ data [ 'options' ] ) ; return ; }
Renders form field

@param \yii\db\ActiveRecord $model
@param \yii\widgets\ActiveForm $form
@param string $name
@param array $data
Renders form field