public static function getDataToField($model, $attribute, $htmlOptions) { MyHtml::resolveNameID($model, $attribute, $htmlOptions); $name = $htmlOptions['name']; $value = MyHtml::resolveValue($model, $attribute); $label = $model->getAttributeLabel($attribute); return compact('name', 'value', 'label', 'htmlOptions'); }