Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Config / ConfigImportValidateEventSubscriberBase.php
1 <?php
2
3 namespace Drupal\Core\Config;
4
5 use Drupal\Core\StringTranslation\StringTranslationTrait;
6 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7
8 /**
9  * Defines a base event listener implementation for config sync validation.
10  */
11 abstract class ConfigImportValidateEventSubscriberBase implements EventSubscriberInterface {
12   use StringTranslationTrait;
13
14   /**
15    * Checks that the configuration synchronization is valid.
16    *
17    * @param ConfigImporterEvent $event
18    *   The config import event.
19    */
20   abstract public function onConfigImporterValidate(ConfigImporterEvent $event);
21
22   /**
23    * {@inheritdoc}
24    */
25   public static function getSubscribedEvents() {
26     $events[ConfigEvents::IMPORT_VALIDATE][] = ['onConfigImporterValidate', 20];
27     return $events;
28   }
29
30 }