/** * Placeholder for backward compatibility (iTop <= 2.1.0) * in case an extension attempts to redefine this function... */ public static function GetRelationQueries($sRelCode) { return parent::GetRelationQueries($sRelCode); }
public static function GetRelationQueries($sRelCode) { switch ($sRelCode) { case "impacts": $aRels = array(); return array_merge($aRels, parent::GetRelationQueries($sRelCode)); break; case 'depends on': $aRels = array("powerconnection" => array("sQuery" => "SELECT PowerConnection WHERE id = :this->powerstart_id", "bPropagate" => true, "iDistance" => 10)); return array_merge($aRels, parent::GetRelationQueries($sRelCode)); break; default: return parent::GetRelationQueries($sRelCode); } }