ConfigImportValidateEventSubscriberBase.php

Same filename and directory in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php
  2. 10 core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php
  3. 11.x core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php

Namespace

Drupal\Core\Config

File

core/lib/Drupal/Core/Config/ConfigImportValidateEventSubscriberBase.php

View source
<?php

namespace Drupal\Core\Config;

use Drupal\Core\StringTranslation\StringTranslationTrait;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
 * Defines a base event listener implementation for config sync validation.
 */
abstract class ConfigImportValidateEventSubscriberBase implements EventSubscriberInterface {
    use StringTranslationTrait;
    
    /**
     * Checks that the configuration synchronization is valid.
     *
     * @param ConfigImporterEvent $event
     *   The config import event.
     */
    public abstract function onConfigImporterValidate(ConfigImporterEvent $event);
    
    /**
     * {@inheritdoc}
     */
    public static function getSubscribedEvents() {
        $events[ConfigEvents::IMPORT_VALIDATE][] = [
            'onConfigImporterValidate',
            20,
        ];
        return $events;
    }

}

Classes

Title Deprecated Summary
ConfigImportValidateEventSubscriberBase Defines a base event listener implementation for config sync validation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.