You are here

public function SchemaMetatagClient::isIncludedClass in Schema.org Metatag 8.2

Detect if this is a Schema.org class we care about.

Parameters

array $item: The item to examine.

Return value

bool Whether or not to include it.

Overrides SchemaMetatagClientInterface::isIncludedClass

1 call to SchemaMetatagClient::isIncludedClass()
SchemaMetatagClient::objectInfo in src/SchemaMetatagClient.php
Retrieve an array of object information from the raw data.

File

src/SchemaMetatagClient.php, line 400

Class

SchemaMetatagClient
Class SchemaMetatagClient.

Namespace

Drupal\schema_metatag

Code

public function isIncludedClass(array $item) {
  if (!isset($item['@type']) || !isset($item['rdfs:label'])) {
    return FALSE;
  }
  if ($item['@type'] != 'rdfs:Class') {
    return FALSE;
  }
  if (!empty($item[static::$prefix . 'supersededBy'])) {
    return FALSE;
  }
  return TRUE;
}