N°3233 - Remove "display_template" from the metamodel and compiler

This commit is contained in:
Molkobain
2020-08-04 11:34:49 +02:00
parent c93c53488d
commit bd0480b5c5
5 changed files with 5 additions and 20 deletions

View File

@@ -20,6 +20,8 @@
require_once(APPROOT.'/application/displayblock.class.inc.php');
/**
* This class manages the special template format used internally to build the iTop web pages
*
* @deprecated Since 2.8.0
*/
class DisplayTemplate
{

View File

@@ -867,18 +867,6 @@ abstract class MetaModel
return self::$m_aClassParams[$sClass]["reconc_keys"];
}
/**
* @param string $sClass
*
* @return string
* @throws \CoreException
*/
final static public function GetDisplayTemplate($sClass)
{
self::_check_subclass($sClass);
return array_key_exists("display_template", self::$m_aClassParams[$sClass]) ? self::$m_aClassParams[$sClass]["display_template"] : '';
}
/**
* @param string $sClass
* @param bool $bOnlyDeclared

View File

@@ -1081,12 +1081,6 @@ EOF
}
$aClassParams['db_finalclass_field'] = $this->GetPropString($oProperties, 'db_final_class_field', $sDefaultFinalClass);
if (($sDisplayTemplate = $oProperties->GetChildText('display_template')) && (strlen($sDisplayTemplate) > 0))
{
$sDisplayTemplate = $sModuleRelativeDir.'/'.$sDisplayTemplate;
$aClassParams['display_template'] = "utils::GetAbsoluteUrlModulesRoot().'$sDisplayTemplate'";
}
$this->CompileFiles($oProperties, $sTempTargetDir.'/'.$sModuleRelativeDir, $sFinalTargetDir.'/'.$sModuleRelativeDir, '');
if (($sIcon = $oProperties->GetChildText('icon')) && (strlen($sIcon) > 0))
{

View File

@@ -770,7 +770,9 @@ class iTopDesignFormat
*/
protected function From17To18($oFactory)
{
// Nothing
// -- 3233 - Remove "display template" feature from MetaModel
$sPath = "/itop_design//class/properties/display_template";
$this->RemoveNodeFromXPath($sPath);
}
/**

View File

@@ -1197,7 +1197,6 @@ $sHeader
</properties>
<naming format=""><attributes/></naming>
<reconciliation><attributes/></reconciliation>
<display_template/>
<icon>$sIcon</icon>
</properties>
<fields/>