You are here

public function EasyRdfConverter::getTypeProperties in Schema.org configuration tool (RDF UI) 8

Extracts properties of a given type.

Parameters

string $type: Schema.Org type of which the properties should be listed. (eg. "schema:Person").

Return value

array|null List of properties.

Throws

\Exception

File

src/EasyRdfConverter.php, line 166

Class

EasyRdfConverter
Extracts details of RDF resources from an RDFa document.

Namespace

Drupal\rdfui

Code

public function getTypeProperties($type) {
  $tokens = explode(":", $type);
  $prefixes = rdf_get_namespaces();
  $uri = $prefixes[$tokens[0]] . $tokens[1];
  $options = array();
  $options += $this
    ->getProperties($uri);
  asort($options);
  return $options;
}