Jackalope\Node::getMixinNodeTypes PHP Метод

getMixinNodeTypes() публичный Метод

{@inheritDoc}
public getMixinNodeTypes ( )
    public function getMixinNodeTypes()
    {
        $this->checkState();
        if (!isset($this->properties['jcr:mixinTypes'])) {
            return array();
        }
        $res = array();
        $ntm = $this->session->getWorkspace()->getNodeTypeManager();
        foreach ($this->properties['jcr:mixinTypes']->getValue() as $type) {
            $res[] = $ntm->getNodeType($type);
        }
        return $res;
    }

Usage Example

Пример #1
0
    private function validateNode(Node $node)
    {
        // This is very slow i believe :-(
        $nodeDef = $node->getPrimaryNodeType();
        $nodeTypes = $node->getMixinNodeTypes();
        array_unshift($nodeTypes, $nodeDef);

        foreach ($nodeTypes as $nodeType) {
            /* @var $nodeType NodeTypeDefinitionInterface */
            $this->validateNodeWithType($node, $nodeType);
        }
    }
All Usage Examples Of Jackalope\Node::getMixinNodeTypes