You are here

public function DrupalListMetaTag::getValue in Metatag 7

Get the string value of this meta tag.

Return value

string The value of this meta tag.

Overrides DrupalDefaultMetaTag::getValue

File

./metatag.inc, line 737
Metatag primary classes.

Class

DrupalListMetaTag
Multiple value meta tag controller.

Code

public function getValue(array $options = array()) {
  $values = array_keys(array_filter($this->data['value']));
  sort($values);
  $value = implode(', ', $values);
  $value = $this
    ->tidyValue($value);

  // Translate the final output string prior to output. Use the
  // 'output' i18n_string object type, and pass along the meta tag's
  // options as the context so it can be handled appropriately.
  $value = metatag_translate_metatag($value, $this->info['name'], $options, NULL, TRUE);
  return $value;
}