mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
N°2313 - Markup extensibility: Add meta information and hooks
Admin. console: - Class and id on object form - Class current and target state on object transition form - Object form mode (view/edit/create/stimulus) - Object attributes: Attribute code, attribute definition class and raw value - Navigation menu: Their IDs on group and items - Actions menu: Their IDs on items Portal: - Object attributes: Attribute code, attribute definition class and raw value
This commit is contained in:
@@ -1022,6 +1022,14 @@ abstract class AttributeDefinition
|
||||
$oFormField->AddValidator(new \Combodo\iTop\Form\Validator\Validator($this->GetValidationPattern()));
|
||||
}
|
||||
|
||||
// Metadata
|
||||
$oFormField->AddMetadata('attribute-code', $this->GetCode());
|
||||
$oFormField->AddMetadata('attribute-type', get_class($this));
|
||||
if($this::IsScalar())
|
||||
{
|
||||
$oFormField->AddMetadata('value-raw', $oObject->Get($this->GetCode()));
|
||||
}
|
||||
|
||||
return $oFormField;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user