예제 #1
0
 /**
  * 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();
 }
예제 #2
0
 /**
  * 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
  *
  * @return void
  */
 public function loadRequestData()
 {
     $this->setChecked(false);
     parent::loadRequestData();
 }