Example #1
0
 /**
  * Remove a hook by ID
  * 
  * To remove the hook that this event is for, call it with the $hookId argument as null or blank.
  * 
  * @param string|null $hookId
  * @return $this
  * 
  */
 public function removeHook($hookId)
 {
     if (empty($hookId)) {
         if ($this->object && $this->id) {
             $this->object->removeHook($this->id);
         }
         return $this;
     } else {
         return parent::removeHook($hookId);
     }
 }