Exemplo n.º 1
0
 /**
  * Get an object handle
  *
  * Only attach this behavior for form (application/x-www-form-urlencoded) POST requests.
  *
  * @return string A string that is unique, or NULL
  * @see execute()
  */
 public function getHandle()
 {
     $result = null;
     if ($this->getRequest()->isPost() && $this->getRequest()->getContentType() == 'application/x-www-form-urlencoded') {
         $result = parent::getHandle();
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Get an object handle
  *
  * Disable dispatcher persistency on non-HTTP requests, e.g. AJAX. This avoids changing the model state session
  * variable of the requested model, which is often undesirable under these circumstances.
  *
  * @return string A string that is unique, or NULL
  * @see execute()
  */
 public function getHandle()
 {
     $result = null;
     if ($this->getRequest()->isGet() && !$this->getRequest()->isAjax()) {
         $result = parent::getHandle();
     }
     return $result;
 }