sType; } public function GetName() : string { return $this->sName; } public function GetUserOptions(): array { return $this->aUserOptions; } public function SearchNode(string $sName) : ?DependencyNode { if ($sName === $this->GetName()) { return $this; } foreach ($this as $oChildNode) { $oNode = $oChildNode->SearchNode($sName); if ($oNode instanceof DependencyNode) { return $oNode; } } return null; } /** * @return array<\Combodo\iTop\Forms\Dependency\DependencyNode> */ public function GetSubNodes() : array { $aResult = []; foreach ($this as $oChildNode) { $aResult = array_merge($aResult, [$oChildNode], $oChildNode->GetSubNodes()); } return $aResult; } public function Display(int $iDepth = 1) { $sResult = str_repeat(' ', $iDepth).$this->GetName()."\n"; foreach ($this as $oNode) { $sResult .= $oNode->Display($iDepth + 1); } return $sResult; } }