mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Clarified the meaning of the attribute 'finalclass'
SVN:trunk[380]
This commit is contained in:
@@ -59,7 +59,7 @@ abstract class AttributeDefinition
|
||||
|
||||
protected $m_sCode;
|
||||
private $m_aParams = array();
|
||||
private $m_sHostClass = array();
|
||||
private $m_sHostClass = '!undefined!';
|
||||
protected function Get($sParamName) {return $this->m_aParams[$sParamName];}
|
||||
protected function IsParam($sParamName) {return (array_key_exists($sParamName, $this->m_aParams));}
|
||||
|
||||
@@ -132,7 +132,7 @@ abstract class AttributeDefinition
|
||||
public function IsNullAllowed() {return true;}
|
||||
public function GetNullValue() {return null;}
|
||||
public function GetCode() {return $this->m_sCode;}
|
||||
public function GetLabel() {return Dict::S('Class:'.$this->m_sHostClass.'/Attribute:'.$this->m_sCode, $this->m_sCode);}
|
||||
public function GetLabel() {return Dict::S('Class:'.$this->m_sHostClass.'/Attribute:'.$this->m_sCode, $this->m_sCode);}
|
||||
public function GetLabel_Obsolete()
|
||||
{
|
||||
// Written for compatibility with a data model written prior to version 0.9.1
|
||||
@@ -668,6 +668,36 @@ class AttributeClass extends AttributeString
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The attribute dedicated to the finalclass automatic attribute
|
||||
*
|
||||
* @package iTopORM
|
||||
* @author Romain Quetiez <romainquetiez@yahoo.fr>
|
||||
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
||||
* @link www.itop.com
|
||||
* @since 1.0
|
||||
* @version $itopversion$
|
||||
*/
|
||||
class AttributeFinalClass extends AttributeString
|
||||
{
|
||||
public function __construct($sCode, $aParams)
|
||||
{
|
||||
$this->m_sCode = $sCode;
|
||||
$aParams["allowed_values"] = null;
|
||||
parent::__construct($sCode, $aParams);
|
||||
}
|
||||
|
||||
public function IsWritable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function GetAsHTML($sValue)
|
||||
{
|
||||
return MetaModel::GetName($sValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map a varchar column (size < ?) to an attribute that must never be shown to the user
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user