PHP Class TbInput

Used for rendering inputs according to Bootstrap standards.
Inheritance: extends CInputWidget
显示文件 Open project: yinhe/yincart Class Usage Examples

Public Properties

Property Type Description
$appendOptions append html attributes.
$appendText text to append.
$captchaOptions captcha html attributes.
$data the data for list inputs.
$enableAjaxValidation This property allows you to disable AJAX valiadtion for certain fields within a form.
$enableClientValidation This property allows you to disable client valiadtion for certain fields within a form.
$errorOptions error html attributes.
$form the associated form widget.
$hintOptions hint html attributes.
$hintText the hint text.
$label the input label text.
$labelOptions label html attributes.
$prependOptions prepend html attributes.
$prependText text to prepend.
$type the input type. Following types are supported: checkbox, checkboxlist, dropdownlist, filefield, password, radiobutton, radiobuttonlist, textarea, textfield, captcha and uneditable.

Public Methods

Method Description
init ( ) ### .init()
run ( ) ### .run()

Protected Methods

Method Description
captcha ( ) : string ### .captcha()
checkBox ( ) : string ### .checkBox()
checkBoxGroupsList ( ) : string ### .checkBoxGroupsList()
checkBoxList ( ) : string ### .checkBoxList()
checkBoxListInline ( ) : string ### .checkBoxListInline()
ckEditor ( ) : mixed ### .ckEditor()
colorpickerField ( ) : string ### .colorpickerField()
dateRangeField ( ) : mixed ### .dateRangeField()
datepickerField ( ) : string ### .datepicketField()
dropDownList ( ) : string ### .dropDownList()
fileField ( ) : string ### .fileField()
getAddonCssClass ( ) : string ### .getAddonCssClass()
getAppend ( ) : string ### .getAppend()
getAttributeId ( string $attribute ) : string ### .getAppend()
getContainerCssClass ( ) : string ### .getContainerCssClass()
getError ( ) : string ### .getError()
getHint ( ) : string ### .getHint()
getLabel ( ) : string ### .getLabel()
getPrepend ( ) : string ### .getPrepend()
hasAddOn ( ) : boolean ### .hasAddOn()
html5Editor ( ) : mixed ### .html5Editor()
markdownEditorJs ( ) : mixed ### .markdownEditorJs()
maskedTextField ( ) : string ### .maskedTextField()
numberField ( ) : string ### . numberField()
passwordField ( ) : string ### .passwordField()
processHtmlOptions ( ) ### .processHtmlOptions()
radioButton ( ) : string ### .radioButton()
radioButtonGroupsList ( ) : string ### .radioButtonGroupsList()
radioButtonList ( ) : string ### .radioButtonList()
radioButtonListInline ( ) : string ### .radioButtonListInline()
redactorJs ( ) : mixed ### .redactorJs()
select2Field ( ) : mixed ### .select2Field()
textArea ( ) : string ### .textArea()
textField ( ) : string ### .textField()
timepickerField ( ) : string ### .timepickerField()
toggleButton ( ) : string ### .toggleButton()
typeAheadField ( ) : mixed Renders a typeAhead field.
uneditableField ( ) : string ### .uneditableField()

Method Details

captcha() abstract protected method

Renders a CAPTCHA.
abstract protected captcha ( ) : string
return string the rendered content

checkBox() abstract protected method

Renders a checkbox.
abstract protected checkBox ( ) : string
return string the rendered content

checkBoxGroupsList() abstract protected method

Renders a list of checkboxes using Button Groups.
abstract protected checkBoxGroupsList ( ) : string
return string the rendered content

checkBoxList() abstract protected method

Renders a list of checkboxes.
abstract protected checkBoxList ( ) : string
return string the rendered content

checkBoxListInline() abstract protected method

Renders a list of inline checkboxes.
abstract protected checkBoxListInline ( ) : string
return string the rendered content

ckEditor() abstract protected method

Renders a bootstrap CKEditor wysiwyg editor.
abstract protected ckEditor ( ) : mixed
return mixed

colorpickerField() abstract protected method

Renders a colorpicker field.
abstract protected colorpickerField ( ) : string
return string the rendered content

dateRangeField() abstract protected method

Renders a daterange picker field
abstract protected dateRangeField ( ) : mixed
return mixed

datepickerField() abstract protected method

Renders a datepicker field.
abstract protected datepickerField ( ) : string
return string the rendered content

dropDownList() abstract protected method

Renders a drop down list (select).
abstract protected dropDownList ( ) : string
return string the rendered content

fileField() abstract protected method

Renders a file field.
abstract protected fileField ( ) : string
return string the rendered content

getAddonCssClass() protected method

Returns the input container CSS classes.
protected getAddonCssClass ( ) : string
return string the CSS class

getAppend() protected method

Returns the append element for the input.
protected getAppend ( ) : string
return string the element

getAttributeId() protected method

Returns the id that should be used for the specified attribute
protected getAttributeId ( string $attribute ) : string
$attribute string the attribute
return string the id

getContainerCssClass() protected method

Returns the container CSS class for the input.
protected getContainerCssClass ( ) : string
return string the CSS class

getError() protected method

Returns the error text for the input.
protected getError ( ) : string
return string the error text

getHint() protected method

Returns the hint text for the input.
protected getHint ( ) : string
return string the hint text

getLabel() protected method

Returns the label for the input.
protected getLabel ( ) : string
return string the label

getPrepend() protected method

Returns the prepend element for the input.
protected getPrepend ( ) : string
return string the element

hasAddOn() protected method

Returns whether the input has an add-on (prepend and/or append).
protected hasAddOn ( ) : boolean
return boolean the result

html5Editor() abstract protected method

Renders a bootstrap wysihtml5 editor.
abstract protected html5Editor ( ) : mixed
return mixed

init() public method

Initializes the widget.
public init ( )

markdownEditorJs() abstract protected method

Renders a markdownEditorJS wysiwyg field.
abstract protected markdownEditorJs ( ) : mixed
return mixed

maskedTextField() abstract protected method

Renders a masked text field.
abstract protected maskedTextField ( ) : string
return string the rendered content

numberField() abstract protected method

Renders a number field.
abstract protected numberField ( ) : string
return string the rendered content

passwordField() abstract protected method

Renders a password field.
abstract protected passwordField ( ) : string
return string the rendered content

processHtmlOptions() protected method

Processes the html options.
protected processHtmlOptions ( )

radioButton() abstract protected method

Renders a radio button.
abstract protected radioButton ( ) : string
return string the rendered content

radioButtonGroupsList() abstract protected method

Renders a list of radio buttons using Button Groups.
abstract protected radioButtonGroupsList ( ) : string
return string the rendered content

radioButtonList() abstract protected method

Renders a list of radio buttons.
abstract protected radioButtonList ( ) : string
return string the rendered content

radioButtonListInline() abstract protected method

Renders a list of inline radio buttons.
abstract protected radioButtonListInline ( ) : string
return string the rendered content

redactorJs() abstract protected method

Renders a redactorJS wysiwyg field.
abstract protected redactorJs ( ) : mixed
return mixed

run() public method

Runs the widget.
public run ( )

select2Field() abstract protected method

Renders a select2 field.
abstract protected select2Field ( ) : mixed
return mixed

textArea() abstract protected method

Renders a textarea.
abstract protected textArea ( ) : string
return string the rendered content

textField() abstract protected method

Renders a text field.
abstract protected textField ( ) : string
return string the rendered content

timepickerField() abstract protected method

Renders a timepicker field.
abstract protected timepickerField ( ) : string
return string the rendered content

toggleButton() abstract protected method

Renders a toggle button.
abstract protected toggleButton ( ) : string
return string the rendered content

typeAheadField() abstract protected method

Renders a typeAhead field.
abstract protected typeAheadField ( ) : mixed
return mixed

uneditableField() abstract protected method

Renders an uneditable field.
abstract protected uneditableField ( ) : string
return string the rendered content

Property Details

$appendOptions public_oe property

append html attributes.
public $appendOptions

$appendText public_oe property

text to append.
public $appendText

$captchaOptions public_oe property

captcha html attributes.
public $captchaOptions

$data public_oe property

the data for list inputs.
public $data

$enableAjaxValidation public_oe property

This property allows you to disable AJAX valiadtion for certain fields within a form.
See also: http://www.yiiframework.com/doc/api/1.1/CActiveForm#error-detail
public $enableAjaxValidation

$enableClientValidation public_oe property

This property allows you to disable client valiadtion for certain fields within a form.
See also: http://www.yiiframework.com/doc/api/1.1/CActiveForm#error-detail
public $enableClientValidation

$errorOptions public_oe property

error html attributes.
public $errorOptions

$form public_oe property

the associated form widget.
public $form

$hintOptions public_oe property

hint html attributes.
public $hintOptions

$hintText public_oe property

the hint text.
public $hintText

$label public_oe property

the input label text.
public $label

$labelOptions public_oe property

label html attributes.
public $labelOptions

$prependOptions public_oe property

prepend html attributes.
public $prependOptions

$prependText public_oe property

text to prepend.
public $prependText

$type public_oe property

the input type. Following types are supported: checkbox, checkboxlist, dropdownlist, filefield, password, radiobutton, radiobuttonlist, textarea, textfield, captcha and uneditable.
public $type