StaticTranslation::__construct

public StaticTranslation::__construct($translations = array()) Constructs a translator from an array of translations. Parameters array $translations: Array of override strings indexed by language and context File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 26 Class StaticTranslation String translator with a static cache for translations. Namespace Drupal\Core\StringTranslation\Translator Code public function __construct($translations = array()) { $t

StaticTranslation::getStringTranslation

public StaticTranslation::getStringTranslation($langcode, $string, $context) Retrieves English string to given language. Parameters string $langcode: Language code to translate to. string $string: The source string. string $context: The string context. Return value string|false Translated string if there is a translation, FALSE if not. Overrides TranslatorInterface::getStringTranslation File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 33 Class StaticTrans

StaticTranslation::reset

public StaticTranslation::reset() Resets translation cache. Since most translation systems implement some form of caching, this provides a way to delete that cache. Overrides TranslatorInterface::reset File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 48 Class StaticTranslation String translator with a static cache for translations. Namespace Drupal\Core\StringTranslation\Translator Code public function reset() { $this->translations = array(); }

StaticTranslation

String translator with a static cache for translations. This is a high performance way to provide a handful of string replacements. Hierarchy class \Drupal\Core\StringTranslation\Translator\StaticTranslation implements TranslatorInterface File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 10 Namespace Drupal\Core\StringTranslation\Translator Members Name Modifiers Type Description StaticTranslation::$translations protected property String

StaticTranslation::$translations

String translations Array of cached translations indexed by language and context. Type: array File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 18 Class StaticTranslation String translator with a static cache for translations. Namespace Drupal\Core\StringTranslation\Translator Code protected $translations;

StaticTranslation::getLanguage

protected StaticTranslation::getLanguage($langcode) Retrieves translations for a given language. Parameters string $langcode: The langcode of the language. Return value array A multidimensional array of translations, indexed by the context the source string belongs to. The second level is using original strings as keys. An empty array will be returned when no translations are available. File core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 63 Class StaticTrans

StaticMenuLinkOverridesInterface::getCacheTags

public StaticMenuLinkOverridesInterface::getCacheTags() The unique cache tag associated with this menu link override. Return value string[] An array of cache tags. File core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php, line 88 Class StaticMenuLinkOverridesInterface Defines an interface for objects which overrides menu links defined in YAML. Namespace Drupal\Core\Menu Code public function getCacheTags();

StaticMenuLinkOverridesInterface::loadOverride

public StaticMenuLinkOverridesInterface::loadOverride($id) Loads any overrides to the definition of a static (YAML-defined) link. Parameters string $id: A menu link plugin ID. Return value array|null An override with following supported keys: parent weight menu_name expanded enabled or NULL if there is no override for the given ID. File core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php, line 33 Class StaticMenuLinkOverridesInterface Defines an interface for objects which o

StaticMenuLinkOverridesInterface::reload

public StaticMenuLinkOverridesInterface::reload() Reloads the overrides from config. Forces all overrides to be reloaded from config storage to compare the override value with the value submitted during test form submission. File core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php, line 16 Class StaticMenuLinkOverridesInterface Defines an interface for objects which overrides menu links defined in YAML. Namespace Drupal\Core\Menu Code public function reload();

StaticMenuLinkOverridesInterface::deleteOverride

public StaticMenuLinkOverridesInterface::deleteOverride($id) Deletes any overrides to the definition of a static (YAML-defined) link. Parameters string $id: A menu link plugin ID. File core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php, line 41 Class StaticMenuLinkOverridesInterface Defines an interface for objects which overrides menu links defined in YAML. Namespace Drupal\Core\Menu Code public function deleteOverride($id);