HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
TbActiveForm Class Reference

Public Member Functions

 init ()
 errorSummary ($models, $header=null, $footer=null, $htmlOptions=array())
 urlFieldGroup ($model, $attribute, $options=array())
 emailFieldGroup ($model, $attribute, $options=array())
 numberFieldGroup ($model, $attribute, $options=array())
 rangeFieldGroup ($model, $attribute, $options=array())
 dateFieldGroup ($model, $attribute, $options=array())
 timeFieldGroup ($model, $attribute, $options=array())
 telFieldGroup ($model, $attribute, $options=array())
 textFieldGroup ($model, $attribute, $options=array())
 searchFieldGroup ($model, $attribute, $options=array())
 passwordFieldGroup ($model, $attribute, $options=array())
 textAreaGroup ($model, $attribute, $options=array())
 fileFieldGroup ($model, $attribute, $options=array())
 radioButtonGroup ($model, $attribute, $options=array())
 checkboxGroup ($model, $attribute, $options=array())
 dropDownListGroup ($model, $attribute, $options=array())
 listBoxGroup ($model, $attribute, $options=array())
 checkboxListGroup ($model, $attribute, $options=array())
 radioButtonListGroup ($model, $attribute, $options=array())
 switchGroup ($model, $attribute, $options=array())
 datePickerGroup ($model, $attribute, $options=array())
 dateRangeGroup ($model, $attribute, $options=array())
 timePickerGroup ($model, $attribute, $options=array())
 dateTimePickerGroup ($model, $attribute, $options=array())
 select2Group ($model, $attribute, $options=array())
 redactorGroup ($model, $attribute, $options=array())
 html5EditorGroup ($model, $attribute, $options=array())
 markdownEditorGroup ($model, $attribute, $options=array())
 ckEditorGroup ($model, $attribute, $options=array())
 typeAheadGroup ($model, $attribute, $options=array())
 maskedTextFieldGroup ($model, $attribute, $options=array())
 colorPickerGroup ($model, $attribute, $options=array())
 captchaGroup ($model, $attribute, $htmlOptions=array(), $options=array())
 passFieldGroup ($model, $attribute, $options=array())
 customFieldGroup ($fieldData, $model, $attribute, $options=array())
 widgetGroup ($className, $model, $attribute, $options=array())

Public Attributes

const TYPE_VERTICAL = 'vertical'
const TYPE_INLINE = 'inline'
const TYPE_HORIZONTAL = 'horizontal'
 $type = self::TYPE_VERTICAL
 $prependCssClass = 'input-group'
 $appendCssClass = 'input-group'
 $addOnCssClass = 'input-group-addon'
 $addOnTag = 'span'
 $addOnWrapperTag = 'div'
 $hintCssClass = 'help-block'
 $hintTag = 'span'
 $showErrors = true

Protected Member Functions

 widgetGroupInternal ($className, &$model, &$attribute, &$options)
 customFieldGroupInternal (&$fieldData, &$model, &$attribute, &$options)
 setDefaultPlaceholder (&$fieldData)
 horizontalGroup (&$fieldData, &$model, &$attribute, &$options)
 verticalGroup (&$fieldData, &$model, &$attribute, &$options)
 inlineGroup (&$fieldData, &$model, &$attribute, &$options)
 renderAddOnBegin ($prependText, $appendText, $prependOptions)
 renderAddOnEnd ($appendText, $appendOptions)
 initOptions (&$options, $initData=false)

Static Protected Member Functions

static addCssClass (&$htmlOptions, $class)

Static Protected Attributes

static $typeClasses

Detailed Description

YiiBooster project. New BSD License This class is extended version of 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 CActiveForm::labelEx call if 'label' is not set
  • 'widgetOption' - options that will be passed to the contained widget
  • 'errorOptions' - options for 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 CActiveForm::error call
  • 'enableClientValidation' - passed to CActiveForm::error call

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

<?php $form = $this->beginWidget('booster.widgets.TbActiveForm', array(
    'type' => 'horizontal',
    'htmlOptions' => array('class' => 'well'),
)); ?>
<?php echo $form->errorSummary($model); ?>
<?php echo $form->textFieldGroup($model, 'username'); ?>
<?php echo $form->passwordFieldGroup($model, 'password', array(), array(
    'hint' => 'Check keyboard layout'
)); ?>
<?php echo $form->checkboxGroup($model, 'rememberMe'); ?>
<?php echo CHtml::submitButton('Login', array('class'=>'btn')); ?>
<?php $this->endWidget(); ?>

Additionally this class provides two additional ways to render custom widget or field or even everything you want with TbActiveForm::widgetGroup and 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(...) );

See Also
http://getbootstrap.com/2.3.2/base-css.html#forms
CActiveForm

Definition at line 72 of file TbActiveForm.php.

Member Function Documentation

static TbActiveForm::addCssClass ( $htmlOptions,
  $class 
)
staticprotected

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

Parameters
array$htmlOptions
string$class

Definition at line 1439 of file TbActiveForm.php.

Here is the caller graph for this function:

TbActiveForm::captchaGroup (   $model,
  $attribute,
  $htmlOptions = array(),
  $options = array() 
)

Generates a color picker field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes for captcha text field.
array$widgetOptionsList of initial property values for the CCaptcha widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated color picker group.
See Also
CCaptcha
CActiveForm::textField
customFieldGroup

Definition at line 1027 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::checkboxGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a checkbox group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated checkbox group.
See Also
CActiveForm::checkbox
customFieldGroup

Definition at line 562 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::checkboxListGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a checkbox list group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$dataValue-label pairs used to generate the check box list.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated checkbox list group.
See Also
CActiveForm::checkboxList
customFieldGroup

Definition at line 677 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::ckEditorGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a CKEditor group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated CKEditor group.
See Also
TbCKEditor
customFieldGroup

Definition at line 944 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::colorPickerGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a color picker field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated color picker group.
See Also
TbColorPicker
customFieldGroup

Definition at line 1004 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::customFieldGroup (   $fieldData,
  $model,
  $attribute,
  $options = array() 
)

Generates a custom field group for a model attribute. About $options argument parameters see TbActiveForm documentation.

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsGroup attributes.
Returns
string The generated custom filed group.
See Also
call_user_func_array

Definition at line 1073 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::customFieldGroupInternal ( $fieldData,
$model,
$attribute,
$options 
)
protected

Generates a custom field group for a model attribute.

It's base function for generating group with field.

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsGroup attributes.
Returns
string The generated custom filed group.
Exceptions
CExceptionRaised on invalid form type.

Definition at line 1141 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::dateFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a date field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated date field group.
See Also
CActiveForm::dateField
customFieldGroup

Definition at line 299 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::datePickerGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a date picker group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated date picker group.
See Also
TbDatePicker
customFieldGroup

Definition at line 784 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::dateRangeGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a date range picker group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated date range picker group.
See Also
TbDateRangePicker
customFieldGroup

Definition at line 804 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::dateTimePickerGroup (   $model,
  $attribute,
  $options = array() 
)

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

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated date-time picker group.
See Also
TbDateTimePicker
customFieldGroup

Definition at line 844 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::dropDownListGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a dropdown list group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$dataData for generating the list options (value=>display).
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated drop down list group.
See Also
CActiveForm::dropDownList
customFieldGroup

Definition at line 615 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::emailFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates an email field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string the generated email field group.
See Also
CActiveForm::emailField
customFieldGroup

Definition at line 218 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::errorSummary (   $models,
  $header = null,
  $footer = null,
  $htmlOptions = array() 
)

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

This method is a wrapper for CActiveForm::errorSummary.

Parameters
mixed$modelsThe models whose input errors are to be displayed. This can be either a single model or an array of models.
string$headerA piece of HTML code that appears in front of the errors
string$footerA piece of HTML code that appears at the end of the errors
array$htmlOptionsAdditional HTML attributes to be rendered in the container div tag.
Returns
string The error summary. Empty if no errors are found.
See Also
CActiveForm::errorSummary

Definition at line 167 of file TbActiveForm.php.

TbActiveForm::fileFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a file field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated file field group.
See Also
CActiveForm::fileField
customFieldGroup

Definition at line 483 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::horizontalGroup ( $fieldData,
$model,
$attribute,
$options 
)
protected

Renders a horizontal custom field group for a model attribute.

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsRow options.

Definition at line 1205 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::html5EditorGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a html5 editor group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated html5 editor group.
See Also
TbHtml5Editor
customFieldGroup

Definition at line 904 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::init ( )

Initializes the widget. This renders the form open tag.

Definition at line 142 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::initOptions ( $options,
  $initData = false 
)
protected
Parameters
array$options

Definition at line 1394 of file TbActiveForm.php.

Here is the caller graph for this function:

TbActiveForm::inlineGroup ( $fieldData,
$model,
$attribute,
$options 
)
protected

Renders a inline custom field group for a model attribute.

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsRow options.

Definition at line 1322 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::listBoxGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a list box group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$data
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated list box group.
See Also
CActiveForm::listBox
customFieldGroup

Definition at line 646 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::markdownEditorGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a markdown editor group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated markdown editor group.
See Also
TbMarkdownEditorJs
customFieldGroup

Definition at line 924 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::maskedTextFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a masked text field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated masked text field group.
See Also
CMaskedTextField
customFieldGroup

Definition at line 984 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::numberFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a number field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated number filed group.
See Also
CActiveForm::numberField
customFieldGroup

Definition at line 245 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::passFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a Pass*Field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated color picker group.
See Also
TbPassfield
customFieldGroup

Definition at line 1056 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::passwordFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a password field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated password field group.
See Also
CActiveForm::passwordField
customFieldGroup

Definition at line 433 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::radioButtonGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a radio button group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated radio button group.
See Also
CActiveForm::radioButton
customFieldGroup

Definition at line 510 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::radioButtonListGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a radio button list group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$dataValue-label pairs used to generate the radio button list.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated radio button list group.
See Also
CActiveForm::radioButtonList
customFieldGroup

Definition at line 721 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::rangeFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a range field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated range field group.
See Also
CActiveForm::rangeField
customFieldGroup

Definition at line 272 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::redactorGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a redactor editor group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated redactor editor group.
See Also
TbRedactorJs
customFieldGroup

Definition at line 884 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::renderAddOnBegin (   $prependText,
  $appendText,
  $prependOptions 
)
protected

Renders add-on begin.

Parameters
string$prependTextPrepended text.
string$appendTextAppended text.
array$prependOptionsPrepend options.

Definition at line 1352 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::renderAddOnEnd (   $appendText,
  $appendOptions 
)
protected

Renders add-on end.

Parameters
string$appendTextAppended text.
array$appendOptionsAppend options.

Definition at line 1377 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::searchFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a search field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsGroup attributes.
Returns
string The generated text field group.
See Also
CActiveForm::searchField
customFieldGroup

Definition at line 406 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::select2Group (   $model,
  $attribute,
  $options = array() 
)

Generates a select2 group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated select2 group.
See Also
TbSelect2
customFieldGroup

Definition at line 864 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::setDefaultPlaceholder ( $fieldData)
protected

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

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.

Definition at line 1171 of file TbActiveForm.php.

Here is the caller graph for this function:

TbActiveForm::switchGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a toggle button group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated toggle button group.
See Also
TbToggleButton
customFieldGroup

Definition at line 764 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::telFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a tel field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated date field group.
See Also
CActiveForm::telField
customFieldGroup

Definition at line 353 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::textAreaGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a text area group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated text area group.
See Also
CActiveForm::textArea
customFieldGroup

Definition at line 458 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::textFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a text field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated text field group.
See Also
CActiveForm::textField
customFieldGroup

Definition at line 380 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::timeFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a time field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated date field group.
See Also
CActiveForm::timeField
customFieldGroup

Definition at line 326 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::timePickerGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a time picker group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated time picker group.
See Also
TbTimePicker
customFieldGroup

Definition at line 824 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::typeAheadGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a type-ahead group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated type-ahead group.
See Also
TbTypeahead
customFieldGroup

Definition at line 964 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::urlFieldGroup (   $model,
  $attribute,
  $options = array() 
)

Generates a url field group for a model attribute.

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

Parameters
CModel$modelThe data model.
string$attributeThe attribute.
array$htmlOptionsAdditional HTML attributes.
array$optionsGroup attributes.
Returns
string The generated url field group.
See Also
CActiveForm::urlField
customFieldGroup

Definition at line 191 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::verticalGroup ( $fieldData,
$model,
$attribute,
$options 
)
protected

Renders a vertical custom field group for a model attribute.

Parameters
array | string$fieldDataPre-rendered field as string or array of arguments for call_user_func_array() function.
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsRow options.

Definition at line 1269 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbActiveForm::widgetGroup (   $className,
  $model,
  $attribute,
  $options = array() 
)

Generates a widget group for a model attribute.

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

Parameters
string$classNameThe widget class name or class in dot syntax (e.g. application.widgets.MyWidget).
CModel$modelThe data model.
string$attributeThe attribute.
array$optionsList of initial property values for the group (Property Name => Property Value).
Returns
string The generated widget group.
See Also
CBaseController::widget
customFieldGroup

Definition at line 1095 of file TbActiveForm.php.

Here is the call graph for this function:

TbActiveForm::widgetGroupInternal (   $className,
$model,
$attribute,
$options 
)
protected

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

Parameters
string$classNameThe widget class name or class in dot syntax (e.g. application.widgets.MyWidget).
CModel$modelThe data model.
string$attributeThe attribute.
array$widgetOptionsList of initial property values for the widget (Property Name => Property Value).
array$optionsGroup attributes.
Returns
string The generated widget group.

Definition at line 1115 of file TbActiveForm.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

TbActiveForm::$addOnCssClass = 'input-group-addon'

Definition at line 106 of file TbActiveForm.php.

TbActiveForm::$addOnTag = 'span'

Definition at line 112 of file TbActiveForm.php.

TbActiveForm::$addOnWrapperTag = 'div'

Definition at line 118 of file TbActiveForm.php.

TbActiveForm::$appendCssClass = 'input-group'

Definition at line 100 of file TbActiveForm.php.

TbActiveForm::$hintCssClass = 'help-block'

Definition at line 124 of file TbActiveForm.php.

TbActiveForm::$hintTag = 'span'

Definition at line 130 of file TbActiveForm.php.

TbActiveForm::$prependCssClass = 'input-group'

Definition at line 94 of file TbActiveForm.php.

TbActiveForm::$showErrors = true

Definition at line 136 of file TbActiveForm.php.

TbActiveForm::$type = self::TYPE_VERTICAL

Definition at line 88 of file TbActiveForm.php.

TbActiveForm::$typeClasses
staticprotected
Initial value:
array (
self::TYPE_VERTICAL => '',
self::TYPE_INLINE => '-inline',
self::TYPE_HORIZONTAL => '-horizontal',
)

Definition at line 79 of file TbActiveForm.php.

const TbActiveForm::TYPE_HORIZONTAL = 'horizontal'

Definition at line 77 of file TbActiveForm.php.

const TbActiveForm::TYPE_INLINE = 'inline'

Definition at line 76 of file TbActiveForm.php.

const TbActiveForm::TYPE_VERTICAL = 'vertical'

Definition at line 75 of file TbActiveForm.php.


The documentation for this class was generated from the following file: