public function SchemaMetatagClientInterface::getTree in Schema.org Metatag 8.2
Get some or all of the object tree.
Examples:
- Use all types from 'Organization' down: $parent = 'Organization' $depth = -1
- Use all 'Organization' types, but only a maximum of two levels deep: $parent = 'Organization' $depth = 2
- Use only the top level for 'Organization': $parent = 'Organization' $depth = 0
- Both 'Place' and 'Virtual Location': $parent = 'Place,VirtualLocation' $depth = -1
Parameters
string $parent_name: The key of the desired sub-array, if any.
int $depth: The desired depth to retrieve below the parent, -1 for the whole tree.
bool $clear: Whether to clear the array created by getTree().
bool $clear_tree: Whether to clear the array created by getObjectTree().
bool $clear_objects: Whether to clear the array created by getObjects().
Return value
array A hierarchical array of the object names.
1 method overrides SchemaMetatagClientInterface::getTree()
- SchemaMetatagClient::getTree in src/
SchemaMetatagClient.php - Get some or all of the object tree.
File
- src/
SchemaMetatagClientInterface.php, line 116
Class
- SchemaMetatagClientInterface
- The SchemaMetatg Client Interface.
Namespace
Drupal\schema_metatagCode
public function getTree($parent_name = NULL, $depth = -1, $clear = FALSE, $clear_tree = FALSE, $clear_objects = FALSE);