Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CForm
  • CFormButtonElement
  • CFormElement
  • CFormElementCollection
  • CFormInputElement
  • CFormStringElement
  • Overview
  • Package
  • Class
  • Tree

Class CFormButtonElement

CFormButtonElement represents a form button element.

CFormButtonElement can represent the following types of button based on CFormButtonElement::$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()
The 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
Extended by CFormElement
Extended by CFormButtonElement
Package: system\web\form
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
Methods summary
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.

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.

Returns

string
scenario names separated by commas. Defaults to null.
public
# setOn( string $value )

Parameters

$value
string
$value scenario names separated by commas.
public string
# render( )

Returns this button.

Returns this button.

Returns

string
the rendering result
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.

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.

Returns

boolean
whether this element is visible.

Overrides

CFormElement::evaluateVisible()
Methods inherited from CFormElement
__construct(), __get(), __isset(), __set(), __toString(), configure(), getParent(), getVisible(), setVisible()
Methods inherited from CComponent
__call(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
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)

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).

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

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.

the label of this button. This property is ignored when a widget is used to generate the button.

Properties inherited from CFormElement
$attributes
Magic properties summary
public string $on
#

Scenario names separated by commas. Defaults to null.

Scenario names separated by commas. Defaults to null.

Magic properties inherited from CFormElement
$parent, $visible
API documentation generated by ApiGen 2.8.0