/** * The methods will loaded the x & y position of the image click into the * ZFormImage component. * * @return void */ public function loadRequestData() { /** * * @todo I don't like getting from both get and post, * Options include getting parent until a form is identified * Potentially pass bucket in as well * I don't like searching up, because for other controls you may not * be contained within a form */ $id = $this->getIDPath(); $x = ZRequest::get($id . "_x"); if (!$x) { $x = ZRequest::post($id . "_x"); } $y = ZRequest::get($id . "_y"); if (!$y) { $y = ZRequest::post($id . "_y"); } if ($x && $y) { $this->_x = $x; $this->_y = $y; } return parent::loadRequestData(); }
/** * Overridden implementation of setValue which sets the 'value' of the * attribute for the ZFormWebElement * * @param string $value * @return void */ public function setValue($value) { parent::setValue($value); if ($value) { $this->checked = true; } else { unset($this->_attributes['checked']); } }
/** * Class constructor. Sets up the ZForm element, types it as a 'PASSWORD' element. * This is the base class for all the INPUT types supported by ZForm. * * @param string id The optional identifier for the newly created ZFormPassword * @param ZFormWebElement The optional parent of the newly create ZFormPassword * The default value is null which means the ZFormPassword is a root element. * @return void */ public function __construct($id = null, $parentNode = null) { parent::__construct($id, $parentNode, 'PASSWORD'); }
/** * Class constructor. Sets up the ZForm element, types it as a 'FORM' element * * @param string id The optional identifier for the newly created ZFormButton * @param ZFormWebElement The optional parent of the newly create ZFormButton. * The default value is null which means the ZFormButton is a root element. * @return void */ public function __construct($id = null, $parentNode = null) { parent::__construct($id, $parentNode, 'BUTTON'); }
/** * Overrides setValue in the parent to also set the checked status of * the ZCheckBox. */ public function setValue($value) { parent::setValue($value); if ($value) { $this->setChecked(true); } else { $this->setChecked(false); } }
/** * Class constructor. Sets up the ZForm element, types it as a 'SUBMIT' element. * This is the base class for all the INPUT types supported by ZForm. * * @param string id The optional identifier for the newly created ZFormSubmitButton * @param ZFormWebElement The optional parent of the newly create ZFormSubmitButton * The default value is null which means the ZFormSubmitButton is a root element. * @return void */ public function __construct($id = null, $parentNode = null) { parent::__construct($id, $parentNode, 'SUBMIT'); }