W3cubDocs

/Drupal 8

public function TranslatableMarkup::getOption

public TranslatableMarkup::getOption($name)

Gets a specific option from this translated string.

Parameters

string $name: Option name.

Return value

mixed The value of this option or empty string of option is not set.

File

core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php, line 167

Class

TranslatableMarkup
Provides translatable markup class.

Namespace

Drupal\Core\StringTranslation

Code

public function getOption($name) {
  return isset($this->options[$name]) ? $this->options[$name] : '';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!TranslatableMarkup.php/function/TranslatableMarkup::getOption/8.1.x