parent
5ac02cf34b
commit
e09e2c1d46
@ -0,0 +1,31 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
class HookDocumentAction extends HookEvent implements HookDocumentActionEventInterface |
||||
{ |
||||
protected function __construct() |
||||
{ |
||||
parent::__construct('HookDocumentAction'); |
||||
} |
||||
|
||||
/** |
||||
* Update all the observers. |
||||
* |
||||
* @param int $type |
||||
* |
||||
* @return array |
||||
*/ |
||||
public function notifyDocumentAction($type) |
||||
{ |
||||
$this->eventData['type'] = $type; |
||||
|
||||
/** @var HookDocumentActionEventInterface $observer */ |
||||
foreach ($this->observers as $observer) { |
||||
$data = $observer->notifyDocumentAction($this); |
||||
$this->setEventData($data); |
||||
} |
||||
|
||||
return $this->eventData; |
||||
} |
||||
} |
||||
@ -0,0 +1,31 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
class HookDocumentItemAction extends HookEvent implements HookDocumentItemActionEventInterface |
||||
{ |
||||
protected function __construct() |
||||
{ |
||||
parent::__construct('HookDocumentItemAction'); |
||||
} |
||||
|
||||
/** |
||||
* Update all the observers. |
||||
* |
||||
* @param int $type |
||||
* |
||||
* @return array |
||||
*/ |
||||
public function notifyDocumentItemAction($type) |
||||
{ |
||||
$this->eventData['type'] = $type; |
||||
|
||||
/** @var HookDocumentItemActionEventInterface $observer */ |
||||
foreach ($this->observers as $observer) { |
||||
$data = $observer->notifyDocumentItemAction($this); |
||||
$this->setEventData($data); |
||||
} |
||||
|
||||
return $this->eventData; |
||||
} |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
interface HookDocumentActionEventInterface extends HookEventInterface |
||||
{ |
||||
public function notifyDocumentAction($type); |
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
interface HookDocumentItemActionEventInterface extends HookEventInterface |
||||
{ |
||||
public function notifyDocumentItemAction($type); |
||||
} |
||||
Loading…
Reference in new issue