You are here

final class AutomaticUpdatesEvents in Automatic Updates 8.2

Defines events for the automatic_updates module.

These events allow listeners to validate updates at various points in the update process. Listeners to these events should add validation results via \Drupal\automatic_updates\Event\UpdateEvent::addValidationResult() if necessary. Only error level validation results will stop an update from continuing.

Hierarchy

Expanded class hierarchy of AutomaticUpdatesEvents

See also

\Drupal\automatic_updates\Event\UpdateEvent

\Drupal\automatic_updates\Validation\ValidationResult

13 files declare their use of AutomaticUpdatesEvents
ComposerExecutableValidator.php in src/Validator/ComposerExecutableValidator.php
CoreComposerValidator.php in src/Validator/CoreComposerValidator.php
DiskSpaceValidator.php in src/Validator/DiskSpaceValidator.php
ExcludedPathsSubscriber.php in src/Event/ExcludedPathsSubscriber.php
PendingUpdatesValidator.php in src/Validator/PendingUpdatesValidator.php

... See full list

File

src/AutomaticUpdatesEvents.php, line 17

Namespace

Drupal\automatic_updates
View source
final class AutomaticUpdatesEvents {

  /**
   * Name of the event fired when checking if the site could perform an update.
   *
   * An update is not actually being started when this event is being fired. It
   * should be used to notify site admins if the site is in a state which will
   * not allow automatic updates to succeed.
   *
   * This event should only be dispatched from ReadinessValidationManager to
   * allow caching of the results.
   *
   * @Event
   *
   * @see \Drupal\automatic_updates\Validation\ReadinessValidationManager
   *
   * @var string
   */
  const READINESS_CHECK = 'automatic_updates.readiness_check';

  /**
   * Name of the event fired when an automatic update is starting.
   *
   * This event is fired before any files are staged. Validation results added
   * by subscribers are not cached.
   *
   * @Event
   *
   * @var string
   */
  const PRE_START = 'automatic_updates.pre_start';

  /**
   * Name of the event fired when an automatic update is about to be committed.
   *
   * Validation results added by subscribers are not cached.
   *
   * @Event
   *
   * @var string
   */
  const PRE_COMMIT = 'automatic_updates.pre_commit';

  /**
   * Name of the event fired when a staged update has been committed.
   *
   * @Event
   *
   * @var string
   */
  const POST_COMMIT = 'automatic_updates.post_commit';

}

Members

Namesort descending Modifiers Type Description Overrides
AutomaticUpdatesEvents::POST_COMMIT constant Name of the event fired when a staged update has been committed.
AutomaticUpdatesEvents::PRE_COMMIT constant Name of the event fired when an automatic update is about to be committed.
AutomaticUpdatesEvents::PRE_START constant Name of the event fired when an automatic update is starting.
AutomaticUpdatesEvents::READINESS_CHECK constant Name of the event fired when checking if the site could perform an update.