You are here

public static function SchemaActionBase::processedTestValue in Schema.org Metatag 7

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

2 calls to SchemaActionBase::processedTestValue()
SchemaCreativeWorkBase::processedTestValue in src/SchemaCreativeWorkBase.php
Provide a test output value for the input value.
SchemaHasPartBase::processedTestValue in src/SchemaHasPartBase.php
Provide a test output value for the input value.

File

src/SchemaActionBase.php, line 86

Class

SchemaActionBase
Schema.org Action items should extend this class.

Code

public static function processedTestValue($items) {
  foreach ($items as $key => $value) {
    switch ($key) {
      case 'target':
        $items[$key] = SchemaEntryPointBase::processedTestValue($items[$key]);
        break;
    }
  }
  return $items;
}