You are here

protected function ReadinessValidationManager::getListenersAsString in Automatic Updates 8.2

Gets all the listeners for a specific event as single string.

Return value

string The listeners as a string.

2 calls to ReadinessValidationManager::getListenersAsString()
ReadinessValidationManager::getStoredValidResults in src/Validation/ReadinessValidationManager.php
Gets stored valid results, if any.
ReadinessValidationManager::run in src/Validation/ReadinessValidationManager.php
Dispatches the readiness check event and stores the results.

File

src/Validation/ReadinessValidationManager.php, line 116

Class

ReadinessValidationManager
Defines a manager to run readiness validation.

Namespace

Drupal\automatic_updates\Validation

Code

protected function getListenersAsString(string $event_name) : string {
  $listeners = $this->eventDispatcher
    ->getListeners($event_name);
  $string = '';
  foreach ($listeners as $listener) {

    /** @var object $object */
    $object = $listener[0];
    $method = $listener[1];
    $string .= '-' . get_class($object) . '::' . $method;
  }
  return $string;
}