PHP Класс TbActiveForm

Наследование: extends CActiveForm
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$inlineErrors flag that indicates if the errors should be displayed as blocks.
$input input class.
$type the form type. Allowed types are in TYPE_* constants

Открытые методы

Метод Описание
captchaRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .captchaRow()
checkBoxGroupsList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string ### .checkBoxGroupsList()
checkBoxGroupsListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .checkBoxGroupsListRow()
checkBoxList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string ### .checkBoxList()
checkBoxListInlineRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .checkBoxListInlineRow()
checkBoxListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .checkBoxListRow()
checkBoxRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .checkBoxRow()
ckEditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .ckEditorRow()
colorpickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .colorpickerRow()
dateRangeRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .dateRangeRow()
datepickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .datepickerRow()
dropDownListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### dropDownListRow()
error ( CModel $model, string $attribute, array $htmlOptions = [], boolean $enableAjaxValidation = true, boolean $enableClientValidation = true ) : string ### .error()
errorSummary ( mixed $models, string $header = null, string $footer = null, array $htmlOptions = [] ) : string ### .errorSummary()
fileFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .fileFieldRow()
html5EditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .html5EditorRow()
init ( ) ### .init() Initializes the widget.
inputRow ( string $type, CModel $model, string $attribute, array $data = null, array $htmlOptions = [] ) : string ### .inputRow()
markdownEditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .markdownEditorRow()
maskedTextField ( CModel $model, string $attribute, array $mask, array $htmlOptions = [] ) : string Renders a masked text field row
maskedTextFieldRow ( CModel $model, string $attribute, array $mask, array $htmlOptions = [] ) : string ### .maskedTextFieldRow()
numberFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string Renders a number field input row.
passwordFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .passwordFieldRow()
radioButtonGroupsList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string ### .radioButtonGroupsList()
radioButtonGroupsListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .radioButtonGroupsListRow()
radioButtonList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string ### .radioButtonList()
radioButtonListInlineRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .radioButtonListInlineRow()
radioButtonListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string ### .radioButtonListRow()
radioButtonRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .radioButtonRow()
redactorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .redactorRow()
select2Row ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .select2Row()
textAreaRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .textAreaRow()
textFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .textFieldRow()
timepickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .timepickerRow()
toggleButtonRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .toggleButtonRow()
typeAheadField ( CModel $model, string $attribute, array $widgetOptions, array $htmlOptions = [] ) : string Renders a type ahead field row
typeAheadRow ( CModel $model, string $attribute, array $widgetOptions = [], array $htmlOptions = [] ) : string Renders a typeAhead input row
uneditableRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string ### .uneditableRow()

Защищенные методы

Метод Описание
getInputClassName ( ) : string Returns the input widget class name suitable for the form.
inputsList ( boolean $checkbox, CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string Renders an input list.
renderError ( CModel $model, string $attribute, array $htmlOptions = [] ) : string Creates the HTML code wrapping the error text for given model attribute.

Описание методов

captchaRow() публичный Метод

Renders a captcha row.
С версии: 0.9.3
public captchaRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

checkBoxGroupsList() публичный Метод

Renders a checkbox list for a model attribute using Button Groups.
С версии: 0.9.5
public checkBoxGroupsList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array value-label pairs used to generate the checkbox list.
$htmlOptions array additional HTML options.
Результат string the generated checkbox list

checkBoxGroupsListRow() публичный Метод

Renders a checkbox list input row using Button Groups.
public checkBoxGroupsListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

checkBoxList() публичный Метод

Renders a checkbox list for a model attribute. This method is a wrapper of {@link CHtml::activeCheckBoxList}. Please check {@link CHtml::activeCheckBoxList} for detailed information about the parameters for this method.
С версии: 0.9.5
public checkBoxList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array value-label pairs used to generate the check box list.
$htmlOptions array additional HTML options.
Результат string the generated check box list

checkBoxListInlineRow() публичный Метод

Renders a checkbox list inline input row.
public checkBoxListInlineRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

checkBoxListRow() публичный Метод

Renders a checkbox list input row.
public checkBoxListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

checkBoxRow() публичный Метод

Renders a checkbox input row.
public checkBoxRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

ckEditorRow() публичный Метод

Renders a WYSIWYG ckeditor
public ckEditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array
Результат string

colorpickerRow() публичный Метод

Renders a colorpicker field row.
С версии: 1.0.3 Booster
public colorpickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes. 'events' and 'options' key specify the events and configuration options of colorpicker respectively.
Результат string the generated row

dateRangeRow() публичный Метод

### .dateRangeRow()
public dateRangeRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array addition HTML attributes. In order to pass initialization parameters to dateRange, you need to set the HTML 'options' key with an array of configuration options.
Результат string

datepickerRow() публичный Метод

Renders a datepicker field row.
С версии: 1.0.2 Booster
public datepickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes. 'events' and 'options' key specify the events and configuration options of datepicker respectively.
Результат string the generated row

dropDownListRow() публичный Метод

Renders a drop-down list input row.
public dropDownListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

error() публичный Метод

Displays the first validation error for a model attribute.
public error ( CModel $model, string $attribute, array $htmlOptions = [], boolean $enableAjaxValidation = true, boolean $enableClientValidation = true ) : string
$model CModel the data model
$attribute string the attribute name
$htmlOptions array additional HTML attributes to be rendered in the container div tag.
$enableAjaxValidation boolean whether to enable AJAX validation for the specified attribute.
$enableClientValidation boolean whether to enable client-side validation for the specified attribute.
Результат string the validation result (error display or success message).

errorSummary() публичный Метод

Displays a summary of validation errors for one or several models. This method is very similar to {@link CHtml::errorSummary} except that it also works when AJAX validation is performed.
См. также: CHtml::errorSummary
public errorSummary ( mixed $models, string $header = null, string $footer = null, array $htmlOptions = [] ) : string
$models mixed the models whose input errors are to be displayed. This can be either a single model or an array of models.
$header string a piece of HTML code that appears in front of the errors
$footer string a piece of HTML code that appears at the end of the errors
$htmlOptions array additional HTML attributes to be rendered in the container div tag.
Результат string the error summary. Empty if no errors are found.

fileFieldRow() публичный Метод

Renders a file field input row.
public fileFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

getInputClassName() защищенный Метод

Returns the input widget class name suitable for the form.
protected getInputClassName ( ) : string
Результат string the class name

html5EditorRow() публичный Метод

Renders a WYSIWYG bootstrap editor
public html5EditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array
Результат string

init() публичный Метод

This renders the form open tag.
public init ( )

inputRow() публичный Метод

Creates an input row of a specific type. This is a generic factory method. It is mainly called by various helper methods which pass correct type definitions to it.
public inputRow ( string $type, CModel $model, string $attribute, array $data = null, array $htmlOptions = [] ) : string
$type string the input type
$model CModel the data model
$attribute string the attribute
$data array the data for list inputs
$htmlOptions array additional HTML attributes
Результат string the generated row

inputsList() защищенный Метод

Renders an input list.
С версии: 0.9.5
protected inputsList ( boolean $checkbox, CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$checkbox boolean flag that indicates if the list is a checkbox-list.
$model CModel the data model
$attribute string the attribute
$data array value-label pairs used to generate the input list.
$htmlOptions array additional HTML options.
Результат string the generated input list.

markdownEditorRow() публичный Метод

Renders a WYSIWYG Markdown editor
public markdownEditorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array
Результат string

maskedTextField() публичный Метод

Renders a masked text field row
С версии: 0.9.5
public maskedTextField ( CModel $model, string $attribute, array $mask, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$mask array the mask (see {@link http://digitalbush.com/projects/masked-input-plugin})
$htmlOptions array additional HTML options.
Результат string the generated masked text field

maskedTextFieldRow() публичный Метод

Renders a masked text field input row.
public maskedTextFieldRow ( CModel $model, string $attribute, array $mask, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$mask array the mask (see {@link http://digitalbush.com/projects/masked-input-plugin})
$htmlOptions array additional HTML attributes
Результат string the generated row

numberFieldRow() публичный Метод

Renders a number field input row.
public numberFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

passwordFieldRow() публичный Метод

Renders a password field input row.
public passwordFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

radioButtonGroupsList() публичный Метод

Renders a radio button list for a model attribute using Button Groups.
С версии: 0.9.5
public radioButtonGroupsList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array value-label pairs used to generate the radio button list.
$htmlOptions array additional HTML options.
Результат string the generated radio button list

radioButtonGroupsListRow() публичный Метод

Renders a radio button list input row using Button Groups.
public radioButtonGroupsListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

radioButtonList() публичный Метод

Renders a radio button list for a model attribute. This method is a wrapper of {@link CHtml::activeRadioButtonList}. Please check {@link CHtml::activeRadioButtonList} for detailed information about the parameters for this method.
С версии: 0.9.5
public radioButtonList ( CModel $model, string $attribute, array $data, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array value-label pairs used to generate the radio button list.
$htmlOptions array additional HTML options.
Результат string the generated radio button list

radioButtonListInlineRow() публичный Метод

Renders a radio button list inline input row.
public radioButtonListInlineRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

radioButtonListRow() публичный Метод

Renders a radio button list input row.
public radioButtonListRow ( CModel $model, string $attribute, array $data = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$data array the list data
$htmlOptions array additional HTML attributes
Результат string the generated row

radioButtonRow() публичный Метод

Renders a radio button input row.
public radioButtonRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

redactorRow() публичный Метод

Renders a WYSIWYG redactor editor
public redactorRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array
Результат string

renderError() защищенный статический Метод

Creates the HTML code wrapping the error text for given model attribute.
См. также: CModel::getErrors
См. также: errorMessageCss
protected static renderError ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute name
$htmlOptions array additional HTML attributes to be rendered in the container div tag.
Результат string the error display. Empty if no errors are found.

select2Row() публичный Метод

TODO: WTF is a input of type Select2? Rename it to something more meaningful! Renders a select2 field row
public select2Row ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel
$attribute string
$htmlOptions array
Результат string

textAreaRow() публичный Метод

Renders a text area input row.
public textAreaRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

textFieldRow() публичный Метод

Renders a text field input row.
public textFieldRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

timepickerRow() публичный Метод

Renders a timepicker field row.
С версии: 0.10.0
public timepickerRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

toggleButtonRow() публичный Метод

Renders a toggle input row.
public toggleButtonRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes (options key sets the options for the toggle component)
Результат string the generated row

typeAheadField() публичный Метод

Renders a type ahead field row
С версии: 1.0.6
public typeAheadField ( CModel $model, string $attribute, array $widgetOptions, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$widgetOptions array typeAhead options (see {@link http://twitter.github.com/bootstrap/javascript.html#typeahead})
$htmlOptions array additional HTML options.
Результат string the generated typeahead field

typeAheadRow() публичный Метод

Renders a typeAhead input row
public typeAheadRow ( CModel $model, string $attribute, array $widgetOptions = [], array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$widgetOptions array
$htmlOptions array additional HTML attributes
Результат string the generated row

uneditableRow() публичный Метод

Renders an uneditable text field row.
С версии: 0.9.5
public uneditableRow ( CModel $model, string $attribute, array $htmlOptions = [] ) : string
$model CModel the data model
$attribute string the attribute
$htmlOptions array additional HTML attributes
Результат string the generated row

Описание свойств

$inlineErrors публичное свойство

flag that indicates if the errors should be displayed as blocks.
public $inlineErrors

$input публичное свойство

input class.
public $input

$type публичное свойство

the form type. Allowed types are in TYPE_* constants
public $type