You are here

public function SchemaNameBase::setValue in Schema.org Metatag 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/metatag/Tag/SchemaNameBase.php \Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::setValue()

Metatag expects a string value, so serialize any array of values.

Overrides MetaNameBase::setValue

File

src/Plugin/metatag/Tag/SchemaNameBase.php, line 121

Class

SchemaNameBase
All Schema.org tags should extend this class.

Namespace

Drupal\schema_metatag\Plugin\metatag\Tag

Code

public function setValue($value) {
  $this->value = $this
    ->schemaMetatagManager()
    ->serialize($value);
}