Class CFormButtonElement
CFormButtonElement represents a form button element.
CFormButtonElement can represent the following types of button based onCFormButtonElement::$type
property:
- htmlButton: a normal button generated using
CHtml::htmlButton()
- htmlReset a reset button generated using
CHtml::htmlButton()
- htmlSubmit: a submit button generated using
CHtml::htmlButton()
- submit: a submit button generated using
CHtml::submitButton()
- button: a normal button generated using
CHtml::button()
- image: an image button generated using
CHtml::imageButton()
- reset: a reset button generated using
CHtml::resetButton()
- link: a link button generated using
CHtml::linkButton()
CFormButtonElement::$type
property can also be a class name or a path alias to the
class. In this case, the button is generated using a widget of the specified
class. Note, the widget must have a property called "name".
Because CFormElement is an ancestor class of CFormButtonElement, a value
assigned to a non-existing property will be stored in CFormElement::$attributes
which
will be passed as HTML attribute values to the CHtml
method generating
the button or initial values of the widget properties.
- CComponent
- CFormElement
- CFormButtonElement
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1
Located at x2engine/framework/web/form/CFormButtonElement.php
public
string
|
#
getOn( )
Returns a value indicating under which scenarios this button is visible. If the value is empty, it means the button is visible under all scenarios. Otherwise, only when the model is in the scenario whose name can be found in this value, will the button be visible. See CModel::scenario for more information about model scenarios. |
public
|
|
public
string
|
|
protected
boolean
|
#
evaluateVisible( )
Evaluates the visibility of this element. This method will check the on property to see if the model is in a scenario that should have this string displayed. |
__construct(),
__get(),
__isset(),
__set(),
__toString(),
configure(),
getParent(),
getVisible(),
setVisible()
|
public static
array
|
$coreTypes | array(
'htmlButton'=>'htmlButton',
'htmlSubmit'=>'htmlButton',
'htmlReset'=>'htmlButton',
'button'=>'button',
'submit'=>'submitButton',
'reset'=>'resetButton',
'image'=>'imageButton',
'link'=>'linkButton',
) |
#
Core button types (alias=>CHtml method name) |
public
string
|
$type |
|
#
the type of this button. This can be a class name, a path alias of a class name, or a button type alias (submit, button, image, reset, link, htmlButton, htmlSubmit, htmlReset). |
public
string
|
$name |
|
#
name of this button |
public
string
|
$label |
|
#
the label of this button. This property is ignored when a widget is used to generate the button. |
$attributes
|
public
string
|
$on |
#
Scenario names separated by commas. Defaults to null. |
$parent,
$visible
|