Forum

New loop in dawObje...
 
Notifications
Retirer tout

New loop in dawObject

2 Posts
2 Utilisateurs
0 Reactions
2,299 Vu
(@antonio-grr)
Posts: 84
Active Member
Début du sujet
 
[#4351]

Hi.
Could you please explain me the meaning of the following loop added to drawOrigin function in objectDetail.php ?

foreach ( $list as $origin ) {
//$origObj=null;
$origObjClass=null;
$origObjId=null;
if ($list->originType == get_class($obj) and $list->originId == $obj->id) {
//$origObj=new $list->refType($list->refId);
$origObjClass=$list->refType;
$origObjId=$list->refId;
} else {
//$origObj=new $list->originType($list->originId);
$origObjClass=$list->originType;
$origObjId=$list->originId;
}
$gotoE=' onClick="gotoElement(' . "'" . $origObjClass . "','" . htmlEncode($origObjId) . "'" . ');" style="cursor: pointer;" ';
echo ' ';
}
It seems that you loop through attributes of object $list ( $obj->Origin), then ,regardless attribute, you test $list->originType and $list->originId (that seem to be a copy of arguments refType, $refId) and echo an onClick action gotoElement to the same object once for each attribute.
I'm missing something.
Thank you for your attention


 
Posté : 15 Mai PM 17:055
(@babynus)
Posts: 14952
Membre Admin
 

Target is to set Origin (that you can view on Ticket or Activity) as Clickable, so that just just can click on, item to go to it.
Alos, new feature is to be able to define several Origins for single item.
Not finished yet and not used yet.


 
Posté : 15 Mai PM 20:055
Share:
Retour en haut