function microdata_get_types in Microdata 7
Helper function.
Return value
array An array of type info, including properties that can be used in those types.
2 calls to microdata_get_types()
- microdata_autocomplete_itemprop in ./
microdata.pages.inc - Autocomplete callback; Itemprop textfield.
- microdata_autocomplete_itemtype in ./
microdata.pages.inc - Autocomplete callback; Itemtype textfield.
File
- ./
microdata.pages.inc, line 74 - Page callbacks for microdata module.
Code
function microdata_get_types() {
$types = array();
$vocabularies = microdata_get_vocabularies();
foreach ($vocabularies as $vocabulary) {
if (isset($vocabulary['types'])) {
foreach ($vocabulary['types'] as $type) {
// @todo Remove the array conversion once Vocabulary Parser is in place.
$type = (array) $type;
$types[$type['url']] = array(
'label' => $type['label'],
'url' => $type['url'],
'vocabulary_label' => $vocabulary['label'],
'properties' => $type['properties'],
);
}
}
}
return $types;
}