diff --git a/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml index 12f357bb9e..f5642c0489 100644 --- a/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml +++ b/datamodels/2.x/itop-container-mgmt/datamodel.itop-container-mgmt.xml @@ -92,7 +92,40 @@ - + + + /** + * Overrides the GetIcon method to return the logo of the associated Software if any, otherwise the default icon of the class will be returned + * + */ + false + public + Custom + Get($sExtKeyCode); + if ($iObj > 0) { + $oObj = MetaModel::GetObject($sIconClass, $iObj, true, true); + $oImage = $oObj->Get($sIconAttCode); + $sIconUrl = $oImage->IsEmpty() ? '' : $oImage->GetDisplayURL($sIconClass, $iObj, $sIconAttCode); + if (strlen($sIconUrl) > 0) { + if ($bImgTag) { + return ""; + } else { + return $sIconUrl; + } + } + } + // Return the default image + return parent::GetIcon($bImgTag); + }]]> + +