You are here

public function RulesLink::getSettingTranslation in Rules Link 7

Same name and namespace in other branches
  1. 7.2 rules_link.module \RulesLink::getSettingTranslation()

Gets the i18n translation of a setting.

Parameters

$name: The setting name.

$langcode: The optional language code. Defaults to the current display language.

@see Entity::getTranslation()

File

./rules_link.module, line 241
Rules Link - module file.

Class

RulesLink
Custom Entity class.

Code

public function getSettingTranslation($name, $langcode = NULL) {
  $value = isset($this->settings[$name]) ? $this->settings[$name] : NULL;
  $i18n_name = 'rules_link:rules_link:' . $this
    ->identifier() . ':' . $name;
  return entity_i18n_string($i18n_name, $value, $langcode);
}