You are here

class ConfigurationUpdateEvent in Update helper 2.x

Same name and namespace in other branches
  1. 8 src/Events/ConfigurationUpdateEvent.php \Drupal\update_helper\Events\ConfigurationUpdateEvent

Event for configuration update execution.

@package Drupal\update_helper\Events

Hierarchy

Expanded class hierarchy of ConfigurationUpdateEvent

2 files declare their use of ConfigurationUpdateEvent
ConfigurationUpdateSubscriber.php in modules/update_helper_checklist/src/Events/ConfigurationUpdateSubscriber.php
Updater.php in src/Updater.php

File

src/Events/ConfigurationUpdateEvent.php, line 12

Namespace

Drupal\update_helper\Events
View source
class ConfigurationUpdateEvent extends Event {

  /**
   * Module name.
   *
   * @var string
   */
  protected $module;

  /**
   * Update name.
   *
   * @var string
   */
  protected $updateName;

  /**
   * Count of warnings occurred during update execution.
   *
   * @var int
   */
  protected $warningCount;

  /**
   * Configuration update event.
   *
   * @param string $module
   *   Module name.
   * @param string $updateName
   *   Update name.
   * @param int $warningCount
   *   Count of warnings occurred during update execution.
   */
  public function __construct($module, $updateName, $warningCount) {
    $this->module = $module;
    $this->updateName = $updateName;
    $this->warningCount = $warningCount;
  }

  /**
   * Get module name.
   *
   * @return string
   *   Returns module name.
   */
  public function getModule() {
    return $this->module;
  }

  /**
   * Get update name.
   *
   * @return string
   *   Returns update name.
   */
  public function getUpdateName() {
    return $this->updateName;
  }

  /**
   * Get status for configuration update.
   *
   * @return bool
   *   Returns status for configuration update.
   */
  public function isSuccessful() {
    return $this->warningCount === 0;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurationUpdateEvent::$module protected property Module name.
ConfigurationUpdateEvent::$updateName protected property Update name.
ConfigurationUpdateEvent::$warningCount protected property Count of warnings occurred during update execution.
ConfigurationUpdateEvent::getModule public function Get module name.
ConfigurationUpdateEvent::getUpdateName public function Get update name.
ConfigurationUpdateEvent::isSuccessful public function Get status for configuration update.
ConfigurationUpdateEvent::__construct public function Configuration update event.