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 CFormElement

CFormElement is the base class for presenting all kinds of form element.

CFormElement implements the way to get and set arbitrary attributes.

CComponent
Extended by CFormElement

Direct known subclasses

CForm, CFormButtonElement, CFormInputElement, CFormStringElement, FontPickerInput
Abstract
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/CFormElement.php
Methods summary
abstract public string
# render( )

Renders this element.

Renders this element.

Returns

string
the rendering result
public
# __construct( mixed $config, mixed $parent )

Constructor.

Constructor.

Parameters

$config
mixed
$config the configuration for this element.
$parent
mixed
$parent the direct parent of this element.

See

CFormElement::configure()
public string
# __toString( )

Converts the object to a string. This is a PHP magic method. The default implementation simply calls CFormElement::render() and return the rendering result.

Converts the object to a string. This is a PHP magic method. The default implementation simply calls CFormElement::render() and return the rendering result.

Returns

string
the string representation of this object.
public mixed
# __get( string $name )

Returns a property value or an attribute value. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or attribute:

$value=$element->propertyName;
$value=$element->attributeName;

Returns a property value or an attribute value. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or attribute:

$value=$element->propertyName;
$value=$element->attributeName;

Parameters

$name
string
$name the property or attribute name

Returns

mixed
the property or attribute value

Throws

CException
if the property or attribute is not defined

See

CFormElement::__set()

Overrides

CComponent::__get()
public boolean
# __isset( string $name )

Checks a property value or an attribute value on existence or not null Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or attribute:

isset($element->propertyName);

Checks a property value or an attribute value on existence or not null Do not call this method. This is a PHP magic method that we override to allow using the following syntax to read a property or attribute:

isset($element->propertyName);

Parameters

$name
string
$name the property or attribute name

Returns

boolean

Overrides

CComponent::__isset()
public mixed
# __set( string $name, mixed $value )

Sets value of a property or attribute. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attribute.

$this->propertyName=$value;
$this->attributeName=$value;

Sets value of a property or attribute. Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attribute.

$this->propertyName=$value;
$this->attributeName=$value;

Parameters

$name
string
$name the property or attribute name
$value
mixed
$value the property or attribute value

Returns

mixed

Throws

CException
if the property/event is not defined or the property is read only.

See

CFormElement::__get()

Overrides

CComponent::__set()
public
# configure( mixed $config )

Configures this object with property initial values.

Configures this object with property initial values.

Parameters

$config
mixed
$config the configuration for this object. This can be an array representing the property names and their initial values. It can also be a string representing the file name of the PHP script that returns a configuration array.
public boolean
# getVisible( )

Returns a value indicating whether this element is visible and should be rendered. This method will call CFormElement::evaluateVisible() to determine the visibility of this element.

Returns a value indicating whether this element is visible and should be rendered. This method will call CFormElement::evaluateVisible() to determine the visibility of this element.

Returns

boolean
whether this element is visible and should be rendered.
public
# setVisible( boolean $value )

Parameters

$value
boolean
$value whether this element is visible and should be rendered.
public mixed
# getParent( )

Returns

mixed
the direct parent of this element. This could be either a CForm object or a CBaseController object (a controller or a widget).
protected boolean
# evaluateVisible( )

Evaluates the visibility of this element. Child classes should override this method to implement the actual algorithm for determining the visibility.

Evaluates the visibility of this element. Child classes should override this method to implement the actual algorithm for determining the visibility.

Returns

boolean
whether this element is visible. Defaults to true.
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 array $attributes array()
#

list of attributes (name=>value) for the HTML element represented by this object.

list of attributes (name=>value) for the HTML element represented by this object.

Magic properties summary
public boolean $visible
#

Whether this element is visible and should be rendered.

Whether this element is visible and should be rendered.

public mixed $parent
#

The direct parent of this element. This could be either a CForm object or a CBaseController object (a controller or a widget).

The direct parent of this element. This could be either a CForm object or a CBaseController object (a controller or a widget).

API documentation generated by ApiGen 2.8.0