LanguageHierarchyConfigEventSubscriber.php in Language Hierarchy 2.x
Same filename and directory in other branches
File
src/EventSubscriber/LanguageHierarchyConfigEventSubscriber.phpView source
<?php
namespace Drupal\language_hierarchy\EventSubscriber;
use Drupal\Core\Config\ConfigEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Class LanguageHierarchyConfigEventSubscriber.
*
* @package Drupal\language_hierarchy
*/
class LanguageHierarchyConfigEventSubscriber implements EventSubscriberInterface {
/**
* This method is called when the config.importer.import event is dispatched.
*
* @param \Symfony\Component\EventDispatcher\Event $event
* The config import event.
*/
public function onConfigImport(Event $event) {
language_hierarchy_update_priorities();
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
$events[ConfigEvents::IMPORT] = [
'onConfigImport',
];
return $events;
}
}
Classes
Name | Description |
---|---|
LanguageHierarchyConfigEventSubscriber | Class LanguageHierarchyConfigEventSubscriber. |