public function PropertyTypeBase::processTestExplodeValue in Schema.org Metatag 8.2
Explode a test value.
For test values, emulates the extra processing a multiple value would get.
Parameters
mixed $items: The input value, either a string or an array.
Return value
mixed Return the correct output value.
Overrides SchemaMetatagTestTagInterface::processTestExplodeValue
1 call to PropertyTypeBase::processTestExplodeValue()
- PropertyTypeBase::processedTestValue in src/
Plugin/ schema_metatag/ PropertyTypeBase.php - Provide a test output value for the input value.
File
- src/
Plugin/ schema_metatag/ PropertyTypeBase.php, line 356
Class
- PropertyTypeBase
- Base class for Property type plugins.
Namespace
Drupal\schema_metatag\Plugin\schema_metatagCode
public function processTestExplodeValue($items) {
if (!is_array($items)) {
$items = $this
->schemaMetatagManager()
->explode($items);
// Clean out any empty values that might have been added by explode().
if (is_array($items)) {
array_filter($items);
}
}
return $items;
}