public function AcsfEvent::__construct in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 src/Event/AcsfEvent.php \Drupal\acsf\Event\AcsfEvent::__construct()
Constructor.
Parameters
AcsfEventDispatcher $dispatcher: The event dispatcher object.
\Drupal\acsf\AcsfLog $log: The log object.
string $type: The type of event to run.
array $registry: The registry from acsf_registry.
array $context: An arbitrary context for handlers.
\Drupal\acsf\AcsfSite $site: The site being operated upon (optional).
File
- src/
Event/ AcsfEvent.php, line 59
Class
- AcsfEvent
- ACSF Event.
Namespace
Drupal\acsf\EventCode
public function __construct(AcsfEventDispatcher $dispatcher, AcsfLog $log, $type, array $registry, array $context, AcsfSite $site = NULL) {
$this->dispatcher = $dispatcher;
$this->log = $log;
$this->type = $type;
$this->site = $site;
// Make sure 'events' has a value so code can always refer to it.
if (!isset($registry['events'])) {
$registry['events'] = [];
}
$this->registry = $registry;
$this->context = $context;
$this->handlers = [
'incomplete' => [],
'complete' => [],
'failed' => [],
];
}