protected function AcsfEvent::loadHandlers in Acquia Cloud Site Factory Connector 8
Same name and namespace in other branches
- 8.2 src/Event/AcsfEvent.php \Drupal\acsf\Event\AcsfEvent::loadHandlers()
Loads event handlers for the appropriate event.
1 call to AcsfEvent::loadHandlers()
- AcsfEvent::run in src/
Event/ AcsfEvent.php - Dispatches all event handlers.
File
- src/
Event/ AcsfEvent.php, line 115
Class
- AcsfEvent
- ACSFEvent.
Namespace
Drupal\acsf\EventCode
protected function loadHandlers() {
foreach ($this->registry['events'] as $info) {
if ($info['type'] == $this->type) {
$class = $info['class'];
// Classes may still define a 'path' entry specifying the full path to
// the class file, though using autoloading is preferred.
if (!empty($info['path'])) {
$path = trim($info['path'], '/');
require_once sprintf('%s/%s/%s.php', DRUPAL_ROOT, $path, $class);
}
$this
->pushHandler(new $class($this), 'incomplete');
}
}
}