public function canApply() { $parent = $this->getSubject()->getParent(); $nodeType = $this->getNodeType(); return $parent->isNodeTypeAllowedAsChildNode($nodeType); }