public static function SchemaPersonOrgBase::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
5 calls to SchemaPersonOrgBase::processedTestValue()
- SchemaAnswerBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaAnswerBase.php - Provide a test output value for the input value.
- SchemaCreativeWorkBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaCreativeWorkBase.php - Provide a test output value for the input value.
- SchemaGovernmentServiceBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaGovernmentServiceBase.php - Provide a test output value for the input value.
- SchemaProgramMembershipBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaProgramMembershipBase.php - Provide a test output value for the input value.
- SchemaQuestionBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaQuestionBase.php - Provide a test output value for the input value.
File
- src/
Plugin/ metatag/ Tag/ SchemaPersonOrgBase.php, line 79
Class
- SchemaPersonOrgBase
- Schema.org Person/Org 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 'url':
case 'sameAs':
$items[$key] = static::processTestExplodeValue($items[$key]);
break;
case 'logo':
$items[$key] = SchemaImageBase::processedTestValue($items[$key]);
break;
}
}
return $items;
}