function YamlDiscovery::addTranslatableProperty
Set one of the YAML values as being translatable.
Parameters
string $value_key: The key corresponding to the value in the YAML that contains a translatable string.
string $context_key: (Optional) the translation context for the value specified by the $value_key.
Return value
$this
File
-
core/
lib/ Drupal/ Core/ Plugin/ Discovery/ YamlDiscovery.php, line 66
Class
- YamlDiscovery
- Allows YAML files to define plugin definitions.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function addTranslatableProperty($value_key, $context_key = '') {
$this->translatableProperties[$value_key] = $context_key;
return $this;
}