public function AcsfEvent::pushHandler in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 src/Event/AcsfEvent.php \Drupal\acsf\Event\AcsfEvent::pushHandler()
Pushes a handler to in internal list.
Parameters
AcsfEventHandler $handler: The handler to add.
string $type: The type of handler: incomplete, complete or failed.
Throws
\Drupal\acsf\Event\AcsfEventHandlerIncompatibleException
1 call to AcsfEvent::pushHandler()
- AcsfEvent::loadHandlers in src/
Event/ AcsfEvent.php - Loads event handlers for the appropriate event.
File
- src/
Event/ AcsfEvent.php, line 173
Class
- AcsfEvent
- ACSF Event.
Namespace
Drupal\acsf\EventCode
public function pushHandler(AcsfEventHandler $handler, $type = 'incomplete') {
if (array_key_exists($type, $this->handlers)) {
$this->handlers[$type][] = $handler;
}
else {
throw new AcsfEventHandlerIncompatibleException(sprintf('The handler type "%s" is incompatible with this event.', $type));
}
}