mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-01 15:14:11 +01:00
CustomFields: overload AttributeDefinition::Fingerprint
SVN:trunk[3997]
This commit is contained in:
@@ -6644,6 +6644,17 @@ class AttributeCustomFields extends AttributeDefinition
|
||||
return $oHandler->WriteValues($oHostObject, $aValues);
|
||||
}
|
||||
|
||||
/**
|
||||
* The part of the current attribute in the object's signature, for the supplied value
|
||||
* @param $value The value of this attribute for the object
|
||||
* @return string The "signature" for this field/attribute
|
||||
*/
|
||||
public function Fingerprint($value)
|
||||
{
|
||||
$oHandler = $this->GetHandler($value->GetValues());
|
||||
return $oHandler->GetValueFingerprint();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the validity of the data
|
||||
* @param DBObject $oHostObject
|
||||
|
||||
@@ -131,4 +131,10 @@ abstract class CustomFieldsHandler
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function CompareValues($aValuesA, $aValuesB);
|
||||
|
||||
/**
|
||||
* String representation of the value, must depend solely on the semantics
|
||||
* @return string
|
||||
*/
|
||||
abstract public function GetValueFingerprint();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user