public function SchemaNameBase::outputValue in Schema.org Metatag 8.2
Same name and namespace in other branches
- 8 src/Plugin/metatag/Tag/SchemaNameBase.php \Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::outputValue()
Transform input value to its display output.
Types that need to transform the output to something different than the stored value should extend this method and do the transformation here.
Parameters
mixed $input_value: Input value, could be either a string or array. This will be the value after token replacement.
Return value
mixed Return the (possibly expanded) value which will be rendered in JSON-LD.
1 call to SchemaNameBase::outputValue()
- SchemaNameBase::output in src/
Plugin/ metatag/ Tag/ SchemaNameBase.php - Generate the HTML tag output for a meta tag.
File
- src/
Plugin/ metatag/ Tag/ SchemaNameBase.php, line 183
Class
- SchemaNameBase
- All Schema.org tags should extend this class.
Namespace
Drupal\schema_metatag\Plugin\metatag\TagCode
public function outputValue($input_value) {
$property_type = !empty($this->pluginDefinition['property_type']) ? $this->pluginDefinition['property_type'] : 'text';
return $this
->propertyTypeManager()
->createInstance($property_type)
->outputValue($input_value);
}