\TbActiveForm

This class is extended version of {@link CActiveForm}, that allows you fully take advantage of bootstrap forms.

Basically form consists of control groups with label, field, error info, hint text and other useful stuff. TbActiveForm brings together all of these things to quickly build custom forms even with non-standard fields.

Each field method has $options for customizing rendering appearance.

  • 'label' - Custom label text
  • 'labelOptions' - options for label tag or passed to {@link CActiveForm::labelEx} call if 'label' is not set
  • 'widgetOption' - options that will be passed to the contained widget
  • 'errorOptions' - options for {@link CActiveForm::error} call
  • 'prepend' - Custom text/HTML-code rendered before field
  • 'prependOptions' - contains either isRaw => true , or HTML options for prepend wrapper tag
  • 'append' - Custom text/HTML-code rendered after field
  • 'appendOptions' - contains either isRaw => true , or HTML options for append wrapper tag
  • 'hint' - Hint text rendered below the field
  • 'hintOptions' - HTML options for hint wrapper tag
  • 'enableAjaxValidation' - passed to {@link CActiveForm::error} call
  • 'enableClientValidation' - passed to {@link CActiveForm::error} call

Here's simple example how to build login form using this class:

beginWidget('booster.widgets.TbActiveForm', array(
    'type' => 'horizontal',
    'htmlOptions' => array('class' => 'well'),
)); ?>

errorSummary($model); ?>

textFieldGroup($model, 'username'); ?>
passwordFieldGroup($model, 'password', array(), array(
    'hint' => 'Check keyboard layout'
)); ?>
checkboxGroup($model, 'rememberMe'); ?>

'btn')); ?>
endWidget(); ?>

Additionally this class provides two additional ways to render custom widget or field or even everything you want with {@link TbActiveForm::widgetGroup} and {@link TbActiveForm::customFieldGroup}. Examples are simply clear: $form->widgetGroup(

'my.super.cool.widget',
array('model' => $model, 'attribute' => $attribute, 'data' => $mydata),
array('hint' => 'Hint text here!')

);

// suppose that field is rendered via SomeClass::someMethod($model, $attribute) call. $form->customFieldGroup(

array(array('SomeClass', 'someMethod'), array($model, $attribute)),
$mode,
$attribute,
array(...)

);

Summary

Methods
Properties
Constants
init()
errorSummary()
urlFieldGroup()
emailFieldGroup()
numberFieldGroup()
rangeFieldGroup()
dateFieldGroup()
timeFieldGroup()
telFieldGroup()
textFieldGroup()
searchFieldGroup()
passwordFieldGroup()
textAreaGroup()
fileFieldGroup()
radioButtonGroup()
checkboxGroup()
dropDownListGroup()
listBoxGroup()
checkboxListGroup()
radioButtonListGroup()
switchGroup()
datePickerGroup()
dateRangeGroup()
timePickerGroup()
dateTimePickerGroup()
select2Group()
redactorGroup()
html5EditorGroup()
markdownEditorGroup()
ckEditorGroup()
typeAheadGroup()
maskedTextFieldGroup()
colorPickerGroup()
captchaGroup()
passFieldGroup()
customFieldGroup()
widgetGroup()
$type
$prependCssClass
$appendCssClass
$addOnCssClass
$addOnTag
$addOnWrapperTag
$hintCssClass
$hintTag
$showErrors
TYPE_VERTICAL
TYPE_INLINE
TYPE_HORIZONTAL
widgetGroupInternal()
customFieldGroupInternal()
setDefaultPlaceholder()
horizontalGroup()
verticalGroup()
inlineGroup()
renderAddOnBegin()
renderAddOnEnd()
initOptions()
addCssClass()
$typeClasses
N/A
No private methods found
No private properties found
N/A

Constants

TYPE_VERTICAL

TYPE_VERTICAL

TYPE_INLINE

TYPE_INLINE

TYPE_HORIZONTAL

TYPE_HORIZONTAL

Properties

$type

$type : string

The form type. Allowed types are in `TYPE_*` constants.

Type

string

$prependCssClass

$prependCssClass : string

Prepend wrapper CSS class.

Type

string

$appendCssClass

$appendCssClass : string

Append wrapper CSS class.

Type

string

$addOnCssClass

$addOnCssClass : string

Add-on CSS class.

Type

string

$addOnTag

$addOnTag : string

Add-on wrapper tag.

Type

string

$addOnWrapperTag

$addOnWrapperTag : string

Tag for wrapping field with prepended and/or appended data.

Type

string

$hintCssClass

$hintCssClass : string

Hint CSS class.

Type

string

$hintTag

$hintTag : string

Hint wrapper tag.

Type

string

$showErrors

$showErrors : bool

Whether to render field error after input. Only for vertical and horizontal types.

Type

bool

$typeClasses

$typeClasses

Methods

init()

init()

Initializes the widget.

This renders the form open tag.

errorSummary()

errorSummary(mixed $models, string $header, string $footer, array $htmlOptions) : string

Displays a summary of validation errors for one or several models.

This method is a wrapper for {@link CActiveForm::errorSummary}.

Parameters

mixed $models

The models whose input errors are to be displayed. This can be either a single model or an array of models.

string $header

A piece of HTML code that appears in front of the errors

string $footer

A piece of HTML code that appears at the end of the errors

array $htmlOptions

Additional HTML attributes to be rendered in the container div tag.

Returns

string —

The error summary. Empty if no errors are found.

urlFieldGroup()

urlFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a url field group for a model attribute.

This method is a wrapper for {@link CActiveForm::urlField} and {@link customFieldGroup}. Please check {@link CActiveForm::urlField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated url field group.

emailFieldGroup()

emailFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates an email field group for a model attribute.

This method is a wrapper for {@link CActiveForm::emailField} and {@link customFieldGroup}. Please check {@link CActiveForm::emailField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

the generated email field group.

numberFieldGroup()

numberFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a number field group for a model attribute.

This method is a wrapper for {@link CActiveForm::numberField} and {@link customFieldGroup}. Please check {@link CActiveForm::numberField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated number filed group.

rangeFieldGroup()

rangeFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a range field group for a model attribute.

This method is a wrapper for {@link CActiveForm::rangeField} and {@link customFieldGroup}. Please check {@link CActiveForm::rangeField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated range field group.

dateFieldGroup()

dateFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a date field group for a model attribute.

This method is a wrapper for {@link CActiveForm::dateField} and {@link customFieldGroup}. Please check {@link CActiveForm::dateField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date field group.

timeFieldGroup()

timeFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a time field group for a model attribute.

This method is a wrapper for {@link CActiveForm::timeField} and {@link customFieldGroup}. Please check {@link CActiveForm::timeField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date field group.

telFieldGroup()

telFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a tel field group for a model attribute.

This method is a wrapper for {@link CActiveForm::telField} and {@link customFieldGroup}. Please check {@link CActiveForm::telField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date field group.

textFieldGroup()

textFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a text field group for a model attribute.

This method is a wrapper for {@link CActiveForm::textField} and {@link customFieldGroup}. Please check {@link CActiveForm::textField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated text field group.

searchFieldGroup()

searchFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a search field group for a model attribute.

This method is a wrapper for {@link CActiveForm::searchField} and {@link customFieldGroup}. Please check {@link CActiveForm::searchField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated text field group.

passwordFieldGroup()

passwordFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a password field group for a model attribute.

This method is a wrapper for {@link CActiveForm::passwordField} and {@link customFieldGroup}. Please check {@link CActiveForm::passwordField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated password field group.

textAreaGroup()

textAreaGroup(\CModel $model, string $attribute, array $options) : string

Generates a text area group for a model attribute.

This method is a wrapper for {@link CActiveForm::textArea} and {@link customFieldGroup}. Please check {@link CActiveForm::textArea} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated text area group.

fileFieldGroup()

fileFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a file field group for a model attribute.

This method is a wrapper for {@link CActiveForm::fileField} and {@link customFieldGroup}. Please check {@link CActiveForm::fileField} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated file field group.

radioButtonGroup()

radioButtonGroup(\CModel $model, string $attribute, array $options) : string

Generates a radio button group for a model attribute.

This method is a wrapper for {@link CActiveForm::radioButton} and {@link customFieldGroup}. Please check {@link CActiveForm::radioButton} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated radio button group.

checkboxGroup()

checkboxGroup(\CModel $model, string $attribute, array $options) : string

Generates a checkbox group for a model attribute.

This method is a wrapper for {@link CActiveForm::checkbox} and {@link customFieldGroup}. Please check {@link CActiveForm::checkbox} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated checkbox group.

dropDownListGroup()

dropDownListGroup(\CModel $model, string $attribute, array $options) : string

Generates a dropdown list group for a model attribute.

This method is a wrapper for {@link CActiveForm::dropDownList} and {@link customFieldGroup}. Please check {@link CActiveForm::dropDownList} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated drop down list group.

listBoxGroup()

listBoxGroup(\CModel $model, string $attribute, array $options) : string

Generates a list box group for a model attribute.

This method is a wrapper for {@link CActiveForm::listBox} and {@link customFieldGroup}. Please check {@link CActiveForm::listBox} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated list box group.

checkboxListGroup()

checkboxListGroup(\CModel $model, string $attribute, array $options) : string

Generates a checkbox list group for a model attribute.

This method is a wrapper for {@link CActiveForm::checkboxList} and {@link customFieldGroup}. Please check {@link CActiveForm::checkboxList} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated checkbox list group.

radioButtonListGroup()

radioButtonListGroup(\CModel $model, string $attribute, array $options) : string

Generates a radio button list group for a model attribute.

This method is a wrapper for {@link CActiveForm::radioButtonList} and {@link customFieldGroup}. Please check {@link CActiveForm::radioButtonList} for detailed information about $htmlOptions argument. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated radio button list group.

switchGroup()

switchGroup(\CModel $model, string $attribute, array $options) : string

Generates a toggle button group for a model attribute.

This method is a wrapper for {@link TbToggleButton} widget and {@link customFieldGroup}. Please check {@link TbToggleButton} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated toggle button group.

datePickerGroup()

datePickerGroup(\CModel $model, string $attribute, array $options) : string

Generates a date picker group for a model attribute.

This method is a wrapper for {@link TbDatePicker} widget and {@link customFieldGroup}. Please check {@link TbDatePicker} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date picker group.

dateRangeGroup()

dateRangeGroup(\CModel $model, string $attribute, array $options) : string

Generates a date range picker group for a model attribute.

This method is a wrapper for {@link TbDateRangePicker} widget and {@link customFieldGroup}. Please check {@link TbDateRangePicker} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date range picker group.

timePickerGroup()

timePickerGroup(\CModel $model, string $attribute, array $options) : string

Generates a time picker group for a model attribute.

This method is a wrapper for {@link TbTimePicker} widget and {@link customFieldGroup}. Please check {@link TbTimePicker} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated time picker group.

dateTimePickerGroup()

dateTimePickerGroup(\CModel $model, string $attribute, array $options) : string

Generates a date-time picker group for a model attribute.

This method is a wrapper for {@link TbDateTimePicker} widget and {@link customFieldGroup}. Please check {@link TbDateTimePicker} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated date-time picker group.

select2Group()

select2Group(\CModel $model, string $attribute, array $options) : string

Generates a select2 group for a model attribute.

This method is a wrapper for {@link TbSelect2} widget and {@link customFieldGroup}. Please check {@link TbSelect2} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated select2 group.

redactorGroup()

redactorGroup(\CModel $model, string $attribute, array $options) : string

Generates a redactor editor group for a model attribute.

This method is a wrapper for {@link TbRedactorJs} widget and {@link customFieldGroup}. Please check {@link TbRedactorJs} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated redactor editor group.

html5EditorGroup()

html5EditorGroup(\CModel $model, string $attribute, array $options) : string

Generates a html5 editor group for a model attribute.

This method is a wrapper for {@link TbHtml5Editor} widget and {@link customFieldGroup}. Please check {@link TbHtml5Editor} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated html5 editor group.

markdownEditorGroup()

markdownEditorGroup(\CModel $model, string $attribute, array $options) : string

Generates a markdown editor group for a model attribute.

This method is a wrapper for {@link TbMarkdownEditorJs} widget and {@link customFieldGroup}. Please check {@link TbMarkdownEditorJs} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated markdown editor group.

ckEditorGroup()

ckEditorGroup(\CModel $model, string $attribute, array $options) : string

Generates a CKEditor group for a model attribute.

This method is a wrapper for {@link TbCKEditor} widget and {@link customFieldGroup}. Please check {@link TbCKEditor} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated CKEditor group.

typeAheadGroup()

typeAheadGroup(\CModel $model, string $attribute, array $options) : string

Generates a type-ahead group for a model attribute.

This method is a wrapper for {@link TbTypeahead} widget and {@link customFieldGroup}. Please check {@link TbTypeahead} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated type-ahead group.

maskedTextFieldGroup()

maskedTextFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a masked text field group for a model attribute.

This method is a wrapper for {@link CMaskedTextField} widget and {@link customFieldGroup}. Please check {@link CMaskedTextField} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated masked text field group.

colorPickerGroup()

colorPickerGroup(\CModel $model, string $attribute, array $options) : string

Generates a color picker field group for a model attribute.

This method is a wrapper for {@link TbColorPicker} widget and {@link customFieldGroup}. Please check {@link TbColorPicker} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated color picker group.

captchaGroup()

captchaGroup(\CModel $model, string $attribute, array $htmlOptions, array $options) : string

Generates a color picker field group for a model attribute.

This method is a wrapper for {@link CCaptcha} widget, {@link textField} and {@link customFieldGroup}. Please check {@link CCaptcha} documentation for detailed information about $widgetOptions. Read detailed information about $htmlOptions in {@link CActiveForm::textField} method. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $htmlOptions

Additional HTML attributes for captcha text field.

array $options

Group attributes.

Returns

string —

The generated color picker group.

passFieldGroup()

passFieldGroup(\CModel $model, string $attribute, array $options) : string

Generates a Pass*Field group for a model attribute.

This method is a wrapper for {@link TbPassfield} widget and {@link customFieldGroup}. Please check {@link TbPassfield} documentation for detailed information about $widgetOptions. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated color picker group.

customFieldGroup()

customFieldGroup(array|string $fieldData, \CModel $model, string $attribute, array $options) : string

Generates a custom field group for a model attribute.

About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated custom filed group.

widgetGroup()

widgetGroup(string $className, \CModel $model, string $attribute, array $options) : string

Generates a widget group for a model attribute.

This method is a wrapper for {@link CBaseController::widget} and {@link customFieldGroup}. Read detailed information about $widgetOptions in $properties argument of {@link CBaseController::widget} method. About $options argument parameters see {@link TbActiveForm} documentation.

Parameters

string $className

The widget class name or class in dot syntax (e.g. application.widgets.MyWidget).

\CModel $model

The data model.

string $attribute

The attribute.

array $options

List of initial property values for the group (Property Name => Property Value).

Returns

string —

The generated widget group.

widgetGroupInternal()

widgetGroupInternal(string $className, \CModel $model, string $attribute, array $options) : string

This is a intermediate method for widget-based group methods.

Parameters

string $className

The widget class name or class in dot syntax (e.g. application.widgets.MyWidget).

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Returns

string —

The generated widget group.

customFieldGroupInternal()

customFieldGroupInternal(array|string $fieldData, \CModel $model, string $attribute, array $options) : string

Generates a custom field group for a model attribute.

It's base function for generating group with field.

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Group attributes.

Throws

\CException

Raised on invalid form type.

Returns

string —

The generated custom filed group.

setDefaultPlaceholder()

setDefaultPlaceholder(array|string $fieldData)

Sets default placeholder value in case of CModel attribute depending on attribute label

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

horizontalGroup()

horizontalGroup(array|string $fieldData, \CModel $model, string $attribute, array $options)

Renders a horizontal custom field group for a model attribute.

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Row options.

verticalGroup()

verticalGroup(array|string $fieldData, \CModel $model, string $attribute, array $options)

Renders a vertical custom field group for a model attribute.

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Row options.

inlineGroup()

inlineGroup(array|string $fieldData, \CModel $model, string $attribute, array $options)

Renders a inline custom field group for a model attribute.

Parameters

array|string $fieldData

Pre-rendered field as string or array of arguments for call_user_func_array() function.

\CModel $model

The data model.

string $attribute

The attribute.

array $options

Row options.

renderAddOnBegin()

renderAddOnBegin(string $prependText, string $appendText, array $prependOptions)

Renders add-on begin.

Parameters

string $prependText

Prepended text.

string $appendText

Appended text.

array $prependOptions

Prepend options.

renderAddOnEnd()

renderAddOnEnd(string $appendText, array $appendOptions)

Renders add-on end.

Parameters

string $appendText

Appended text.

array $appendOptions

Append options.

initOptions()

initOptions(array $options,  $initData)

Parameters

array $options
$initData

addCssClass()

addCssClass(array $htmlOptions, string $class)

Utility function for appending class names for a generic $htmlOptions array.

Parameters

array $htmlOptions
string $class