function LocaleTranslationCacheTag::getSubscribedEvents

Same name in other branches
  1. 9 core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php \Drupal\locale\EventSubscriber\LocaleTranslationCacheTag::getSubscribedEvents()
  2. 10 core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php \Drupal\locale\EventSubscriber\LocaleTranslationCacheTag::getSubscribedEvents()
  3. 11.x core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php \Drupal\locale\EventSubscriber\LocaleTranslationCacheTag::getSubscribedEvents()

File

core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php, line 41

Class

LocaleTranslationCacheTag
A subscriber invalidating cache tags when translating a string.

Namespace

Drupal\locale\EventSubscriber

Code

public static function getSubscribedEvents() {
    $events[LocaleEvents::SAVE_TRANSLATION][] = [
        'saveTranslation',
    ];
    return $events;
}

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