mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Relations & Impact analysis enhancements:
- Detailled tooltips in the graph
- Context queries ("knowing that")
SVN:trunk[3583]
This commit is contained in:
@@ -1458,13 +1458,17 @@ abstract class MetaModel
|
||||
*
|
||||
* @return RelationGraph The graph of all the related objects
|
||||
*/
|
||||
static public function GetRelatedObjectsDown($sRelCode, $aSourceObjects, $iMaxDepth = 99, $bEnableRedundancy = true, $aUnreachable = array())
|
||||
static public function GetRelatedObjectsDown($sRelCode, $aSourceObjects, $iMaxDepth = 99, $bEnableRedundancy = true, $aUnreachable = array(), $aContexts = array())
|
||||
{
|
||||
$oGraph = new RelationGraph();
|
||||
foreach ($aSourceObjects as $oObject)
|
||||
{
|
||||
$oGraph->AddSourceObject($oObject);
|
||||
}
|
||||
foreach($aContexts as $key => $sOQL)
|
||||
{
|
||||
$oGraph->AddContextQuery($key, $sOQL);
|
||||
}
|
||||
$oGraph->ComputeRelatedObjectsDown($sRelCode, $iMaxDepth, $bEnableRedundancy, $aUnreachable);
|
||||
return $oGraph;
|
||||
}
|
||||
@@ -1479,13 +1483,17 @@ abstract class MetaModel
|
||||
*
|
||||
* @return RelationGraph The graph of all the related objects
|
||||
*/
|
||||
static public function GetRelatedObjectsUp($sRelCode, $aSourceObjects, $iMaxDepth = 99, $bEnableRedundancy = true)
|
||||
static public function GetRelatedObjectsUp($sRelCode, $aSourceObjects, $iMaxDepth = 99, $bEnableRedundancy = true, $aContexts = array())
|
||||
{
|
||||
$oGraph = new RelationGraph();
|
||||
foreach ($aSourceObjects as $oObject)
|
||||
{
|
||||
$oGraph->AddSinkObject($oObject);
|
||||
}
|
||||
foreach($aContexts as $key => $sOQL)
|
||||
{
|
||||
$oGraph->AddContextQuery($key, $sOQL);
|
||||
}
|
||||
$oGraph->ComputeRelatedObjectsUp($sRelCode, $iMaxDepth, $bEnableRedundancy);
|
||||
return $oGraph;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user