PHPTransliteration.php

Contains \Drupal\Core\Transliteration\PHPTransliteration.

Namespace

Drupal\Core\Transliteration

File

drupal/core/lib/Drupal/Core/Transliteration/PHPTransliteration.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Transliteration\PHPTransliteration.
 */
namespace Drupal\Core\Transliteration;

use Drupal\Component\Transliteration\PHPTransliteration as BaseTransliteration;

/**
 * Enhances PHPTransliteration with an alter hook.
 *
 * @ingroup transliteration
 */
class PHPTransliteration extends BaseTransliteration {

  /**
   * Overrides \Drupal\Component\Transliteration\PHPTransliteration::readLanguageOverrides().
   *
   * Allows modules to alter the language-specific $overrides array by invoking
   * hook_transliteration_overrides_alter().
   */
  protected function readLanguageOverrides($langcode) {
    parent::readLanguageOverrides($langcode);

    // Let modules alter the language-specific overrides.
    drupal_alter('transliteration_overrides', $this->languageOverrides[$langcode], $langcode);
  }

}

Classes

Namesort descending Description
PHPTransliteration Enhances PHPTransliteration with an alter hook.