Relations & Impact analysis enhancements:

- Detailled tooltips in the graph
- Context queries ("knowing that")

SVN:trunk[3583]
This commit is contained in:
Denis Flaven
2015-05-24 20:47:11 +00:00
parent 80c0312219
commit 0769b2c481
26 changed files with 688 additions and 71 deletions

View File

@@ -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;
}