mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Automaticaly insert the "final class" into lists where an external key is pointing to a class that has child classes
SVN:trunk[573]
This commit is contained in:
@@ -77,7 +77,7 @@ abstract class AttributeDefinition
|
||||
|
||||
protected $m_sCode;
|
||||
private $m_aParams = array();
|
||||
private $m_sHostClass = '!undefined!';
|
||||
protected $m_sHostClass = '!undefined!';
|
||||
protected function Get($sParamName) {return $this->m_aParams[$sParamName];}
|
||||
protected function IsParam($sParamName) {return (array_key_exists($sParamName, $this->m_aParams));}
|
||||
|
||||
@@ -1357,7 +1357,6 @@ class AttributeExternalKey extends AttributeDBFieldVoid
|
||||
*/
|
||||
class AttributeExternalField extends AttributeDefinition
|
||||
{
|
||||
|
||||
static protected function ListExpectedParams()
|
||||
{
|
||||
return array_merge(parent::ListExpectedParams(), array("extkey_attcode", "target_attcode"));
|
||||
@@ -1373,6 +1372,25 @@ class AttributeExternalField extends AttributeDefinition
|
||||
return $oExtAttDef->GetSQLCol();
|
||||
}
|
||||
|
||||
public function GetLabel()
|
||||
{
|
||||
$oRemoteAtt = $this->GetExtAttDef();
|
||||
$sDefault = $oRemoteAtt->GetLabel();
|
||||
return Dict::S('Class:'.$this->m_sHostClass.'/Attribute:'.$this->m_sCode, $sDefault);
|
||||
}
|
||||
public function GetDescription()
|
||||
{
|
||||
$oRemoteAtt = $this->GetExtAttDef();
|
||||
$sDefault = $oRemoteAtt->GetDescription();
|
||||
return Dict::S('Class:'.$this->m_sHostClass.'/Attribute:'.$this->m_sCode.'+', $sDefault);
|
||||
}
|
||||
public function GetHelpOnEdition()
|
||||
{
|
||||
$oRemoteAtt = $this->GetExtAttDef();
|
||||
$sDefault = $oRemoteAtt->GetHelpOnEdition();
|
||||
return Dict::S('Class:'.$this->m_sHostClass.'/Attribute:'.$this->m_sCode.'?', $sDefault);
|
||||
}
|
||||
|
||||
public function IsExternalKey($iType = EXTKEY_RELATIVE)
|
||||
{
|
||||
switch($iType)
|
||||
|
||||
Reference in New Issue
Block a user