You are here

public static function SchemaNameBase::processTestExplodeValue in Schema.org Metatag 7

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/SchemaCountryBase.php
Provide a test output value for the input value.
SchemaEntryPointBase::processedTestValue in src/SchemaEntryPointBase.php
Provide a test output value for the input value.
SchemaIdReferenceBase::processedTestValue in src/SchemaIdReferenceBase.php
Provide a test output value for the input value.
SchemaOpeningHoursSpecificationBase::processedTestValue in src/SchemaOpeningHoursSpecificationBase.php
Provide a test output value for the input value.
SchemaPersonOrgBase::processedTestValue in src/SchemaPersonOrgBase.php
Provide a test output value for the input value.

... See full list

File

src/SchemaNameBase.php, line 248

Class

SchemaNameBase
All Schema.org tags should extend this class.

Code

public static function processTestExplodeValue($items) {
  if (!is_array($items)) {
    $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;
}