Class ZFormCheckbox

Description

Located in /Form/elements/ZFormCheckbox.php (line 34)

ZFormElement
   |
   --ZFormWebElement
      |
      --ZFormInputElement
         |
         --ZFormCheckbox
Variable Summary
 mixed $_checked
Method Summary
 void __construct ([string $id = null], [ZFormWebElement $parentNode = null])
 boolean getChecked ()
 array getMemento ()
 void loadRequestData ()
 void setChecked ($checked $checked)
 void setMemento (array $memento)
 void setValue ( $value)
Variables
Methods
Constructor __construct (line 47)

Class constructor. Sets up the ZForm element, types it as a 'CHECKBOX' element

  • access: public
void __construct ([string $id = null], [ZFormWebElement $parentNode = null])
  • string $id: id The optional identifier for the newly created ZFormButton
  • ZFormWebElement $parentNode: The optional parent of the newly create ZFormButton. The default value is null which means the ZFormButton is a root element.

Redefinition of:
ZFormInputElement::__construct()
Class constructor. Sets up the ZForm element, types it as a 'INPUT' element.
getChecked (line 75)

Returns the true if the CheckBox is checked

  • return: true if checked, false otherwise
  • access: public
boolean getChecked ()
getMemento (line 87)

Create a memento which saves the state of the Checkbox for storage in the session.

  • access: public
array getMemento ()

Redefinition of:
ZFormInputElement::getMemento()
Retrieve the memento which will be stored with the session data representing the state of the input field. The default implemention is to simply ask the input element for its value
loadRequestData (line 116)

The method is called when a ZForm is being processed to give the ZFormCheckbox and opportunity to initialize itself even when there is not data being directly targed to the ZFormWebElement

  • access: public
void loadRequestData ()

Redefinition of:
ZFormWebElement::loadRequestData()
Retrieves the data associated with this element from the ZRequest object.
setChecked (line 59)

Sets the value of the HTML checked attribute

  • access: public
void setChecked ($checked $checked)
  • $checked $checked: boolean
setMemento (line 101)

Restores the state of the checkbox from its memento which was returned by getMemento.

  • access: public
void setMemento (array $memento)
  • array $memento: restored state memento from original call to getMemento

Redefinition of:
ZFormInputElement::setMemento()
Restores the state of the input element from its memento which was returned by getMemento above. The default implementation is to set the value of the input element to the memento.
setValue (line 126)

Overrides setValue in the parent to also set the checked status of the ZCheckBox.

  • access: public
void setValue ( $value)
  • $value

Redefinition of:
ZFormWebElement::setValue()
Overridden implementation of setValue which sets the 'value' of the attribute for the ZFormWebElement

Inherited Methods

Inherited From ZFormInputElement

 ZFormInputElement::__construct()
 ZFormInputElement::getMemento()
 ZFormInputElement::setMemento()

Inherited From ZFormWebElement

 ZFormWebElement::__construct()
 ZFormWebElement::addScriptBlock()
 ZFormWebElement::close()
 ZFormWebElement::emitAttributes()
 ZFormWebElement::emitScriptBlocks()
 ZFormWebElement::getMemento()
 ZFormWebElement::getValue()
 ZFormWebElement::loadRequestData()
 ZFormWebElement::open()
 ZFormWebElement::render()
 ZFormWebElement::renderBody()
 ZFormWebElement::setMemento()
 ZFormWebElement::setValue()
 ZFormWebElement::setWrapExisting()
 ZFormWebElement::_applyClientBehaviors()
 ZFormWebElement::_emitClientBehaviors()
 ZFormWebElement::_emitClientValidators()
 ZFormWebElement::__get()
 ZFormWebElement::__set()

Inherited From ZFormElement

 ZFormElement::__construct()
 ZFormElement::addBehavior()
 ZFormElement::addEventListener()
 ZFormElement::addValidator()
 ZFormElement::appendChild()
 ZFormElement::fireEvent()
 ZFormElement::getAttribute()
 ZFormElement::getAttributes()
 ZFormElement::getBehaviors()
 ZFormElement::getChildNodes()
 ZFormElement::getElementById()
 ZFormElement::getErrorMessage()
 ZFormElement::getEventListeners()
 ZFormElement::getID()
 ZFormElement::getIDPath()
 ZFormElement::getIsProcessing()
 ZFormElement::getMemento()
 ZFormElement::getParentNode()
 ZFormElement::getRoot()
 ZFormElement::getValidationErrors()
 ZFormElement::getValidators()
 ZFormElement::getValue()
 ZFormElement::handleEvent()
 ZFormElement::hasChildNodes()
 ZFormElement::invokeApplication()
 ZFormElement::loadRequestData()
 ZFormElement::persist()
 ZFormElement::process()
 ZFormElement::removeChild()
 ZFormElement::removedBehavior()
 ZFormElement::removedValidator()
 ZFormElement::removeEventListener()
 ZFormElement::restoreState()
 ZFormElement::setAllowEvents()
 ZFormElement::setAttribute()
 ZFormElement::setID()
 ZFormElement::setMemento()
 ZFormElement::setParentNode()
 ZFormElement::setProcess()
 ZFormElement::setValue()
 ZFormElement::validate()
 ZFormElement::_appendToList()
 ZFormElement::_computeIDPath()
 ZFormElement::_gatherMementos()
 ZFormElement::_isLegalName()
 ZFormElement::_performValidation()
 ZFormElement::_processEvents()
 ZFormElement::_removeFromList()
 ZFormElement::_restoreMementos()
Class Constants

Inherited Constants

Inherited from ZFormElement

ZFormElement::PATH_SEPARATOR

Documentation generated on Thu, 18 Jan 2007 10:01:32 -0800 by phpDocumentor 1.3.1