/** * @param interface_model $objOneElement * @param string $intAllowedLevel * @return string */ public static function getPathName(interface_model $objOneElement) { //fetch the process-path, at least two levels $arrParents = $objOneElement->getPathArray(); // remove first two nodes if (count($arrParents) >= 2) { array_shift($arrParents); array_shift($arrParents); } //remove current element array_pop($arrParents); //Only return three levels $arrPath = array(); for ($intI = 0; $intI < 3; $intI++) { $strPathId = array_pop($arrParents); if (!validateSystemid($strPathId)) { break; } $objObject = class_objectfactory::getInstance()->getObject($strPathId); $arrPath[] = $objObject->getStrDisplayName(); } if (count($arrPath) == 0) { return ""; } $strPath = implode(" > ", array_reverse($arrPath)); return $strPath; }