public function SchemaMetatagTagsTestBase::getTreeParent in Schema.org Metatag 8.2
Find tree parents for tests.
1 call to SchemaMetatagTagsTestBase::getTreeParent()
- SchemaMetatagTagsTestBase::setUp in tests/
src/ Functional/ SchemaMetatagTagsTestBase.php
File
- tests/
src/ Functional/ SchemaMetatagTagsTestBase.php, line 98
Class
- SchemaMetatagTagsTestBase
- Base class to test all of the meta tags that are in a specific module.
Namespace
Drupal\Tests\schema_metatag\FunctionalCode
public function getTreeParent() {
$property_types = [];
$definitions = $this
->metatagTagManager()
->getDefinitions();
foreach ($definitions as $tag_name => $definition) {
if ($definition['group'] == $this->groupName) {
if (!empty($definition['tree_parent'])) {
$property_types[$tag_name] = array_shift($definition['tree_parent']);
}
}
}
return $property_types;
}