public static function SchemaNameBase::processTestExplodeValue in Schema.org Metatag 8
Explode a test value.
For test values, emulates the extra processing a multiple value would get.
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 SchemaMetatagTestTagInterface::processTestExplodeValue
6 calls to SchemaNameBase::processTestExplodeValue()
- SchemaCountryBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaCountryBase.php - Provide a test output value for the input value.
- SchemaEntryPointBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaEntryPointBase.php - Provide a test output value for the input value.
- SchemaIdReferenceBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaIdReferenceBase.php - Provide a test output value for the input value.
- SchemaOpeningHoursSpecificationBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaOpeningHoursSpecificationBase.php - Provide a test output value for the input value.
- SchemaPersonOrgBase::processedTestValue in src/
Plugin/ metatag/ Tag/ SchemaPersonOrgBase.php - Provide a test output value for the input value.
File
- src/
Plugin/ metatag/ Tag/ SchemaNameBase.php, line 251
Class
- SchemaNameBase
- All Schema.org tags should extend this class.
Namespace
Drupal\schema_metatag\Plugin\metatag\TagCode
public static function processTestExplodeValue($items) {
if (!is_array($items)) {
// Call this value statically for static test value.
$items = SchemaMetatagManager::explode($items);
// Clean out any empty values that might have been added by explode().
if (is_array($items)) {
array_filter($items);
}
}
return $items;
}