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;
}
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); } }