protected function getSubtreeLimitations(Tag $tag)
    {
        $result = [];

        foreach ($this->contentTypeService->loadContentTypeGroups() as $contentTypeGroup) {
            foreach ($this->contentTypeService->loadContentTypes($contentTypeGroup) as $contentType) {
                foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {
                    if ($fieldDefinition->fieldTypeIdentifier === 'eztags') {
                        $validatorConfiguration = $fieldDefinition->getValidatorConfiguration();
                        if (
                            !empty($validatorConfiguration['TagsValueValidator']['subTreeLimit']) &&
                            $validatorConfiguration['TagsValueValidator']['subTreeLimit'] === $tag->id
                        ) {
                            $result[] = [
                                'contentTypeId' => $contentType->id,
                                'attributeIdentifier' => $fieldDefinition->identifier,
                            ];
                        }
                    }
                }
            }
        }

        return $result;
    }
protected function getSubtreeLimitations(Tag $tag)
    {
        $result = [];

        foreach ($this->contentTypeService->loadContentTypeGroups() as $contentTypeGroup) {
            foreach ($this->contentTypeService->loadContentTypes($contentTypeGroup) as $contentType) {
                foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {
                    if ($fieldDefinition->fieldTypeIdentifier === 'eztags') {
                        $validatorConfiguration = $fieldDefinition->getValidatorConfiguration();
                        if (
                            !empty($validatorConfiguration['TagsValueValidator']['subTreeLimit']) &&
                            $validatorConfiguration['TagsValueValidator']['subTreeLimit'] === $tag->id
                        ) {
                            $result[] = [
                                'contentTypeId' => $contentType->id,
                                'attributeIdentifier' => $fieldDefinition->identifier,
                            ];
                        }
                    }
                }
            }
        }

        return $result;
    }
protected function getSubtreeLimitations ( Tag $ tag ) { $ result = [ ] ; foreach ( $ this -> contentTypeService -> loadContentTypeGroups ( ) as $ contentTypeGroup ) { foreach ( $ this -> contentTypeService -> loadContentTypes ( $ contentTypeGroup ) as $ contentType ) { foreach ( $ contentType -> getFieldDefinitions ( ) as $ fieldDefinition ) { if ( $ fieldDefinition -> fieldTypeIdentifier === 'eztags' ) { $ validatorConfiguration = $ fieldDefinition -> getValidatorConfiguration ( ) ; if ( ! empty ( $ validatorConfiguration [ 'TagsValueValidator' ] [ 'subTreeLimit' ] ) && $ validatorConfiguration [ 'TagsValueValidator' ] [ 'subTreeLimit' ] === $ tag -> id ) { $ result [ ] = [ 'contentTypeId' => $ contentType -> id , 'attributeIdentifier' => $ fieldDefinition -> identifier , ] ; } } } } } return $ result ; }
Returns an array with subtree limitations for given tag.

@param \Netgen\TagsBundle\API\Repository\Values\Tags\Tag $tag

@return array
Returns an array with subtree limitations for given tag .