public static function SchemaPlaceBase::processedTestValue in Schema.org Metatag 8
Provide a test output value for the input value.
Tags that return values in a different format than the input, like values that are exploded, should extend this method and return a valid value.
Value must be static so the test can retrieve the value without instantiating the class.
Parameters
mixed $items: The input value, either a string or an array.
Return value
mixed Return the correct output value.
Overrides SchemaNameBase::processedTestValue
1 call to SchemaPlaceBase::processedTestValue()
- SchemaEventBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaEventBase.php - Provide a test output value for the input value.
File
- src/
Plugin/ metatag/ Tag/ SchemaPlaceBase.php, line 74
Class
- SchemaPlaceBase
- Schema.org Place items should extend this class.
Namespace
Drupal\schema_metatag\Plugin\metatag\TagCode
public static function processedTestValue($items) {
foreach ($items as $key => $value) {
switch ($key) {
case 'address':
$items[$key] = SchemaAddressBase::processedTestValue($items[$key]);
break;
case 'geo':
$items[$key] = SchemaGeoBase::processedTestValue($items[$key]);
break;
}
}
return $items;
}