Kernel::System::ITSMConfigItem::Definition - sub module of Kernel::System::ITSMConfigItem
All definition functions.
DefinitionList()
return a config item definition list as arrayhash reference
my $DefinitionListRef = $ConfigItemObject->DefinitionList(
ClassID => 123,
);
returns
my $DefinitionListRef = [
{
'Version' => '1',
'CreateTime' => '2012-06-12 14:09:43',
'DefinitionID' => '1',
'CreateBy' => '123',
'Definition' => '[
{
Key => \'Vendor\',
Name => \'Vendor\',
Searchable => 1,
Input => {
Type => \'Text\',
Size => 50,
MaxLength => 50,
},
},
{
Key => \'Description\',
Name => \'Description\',
Searchable => 1,
Input => {
Type => \'TextArea\',
},
},
{
Key => \'Type\',
Name => \'Type\',
Searchable => 1,
Input => {
Type => \'GeneralCatalog\',
Class => \'ITSM::ConfigItem::Computer::Type\',
Translation => 1,
},
},
... etc ...
];',
}
];
DefinitionGet()
return a config item definition as hash reference
Return $Definition->{DefinitionID} $Definition->{ClassID} $Definition->{Class} $Definition->{Definition} $Definition->{DefinitionRef} $Definition->{Version} $Definition->{CreateTime} $Definition->{CreateBy}
my $DefinitionRef = $ConfigItemObject->DefinitionGet(
DefinitionID => 123,
);
or
my $DefinitionRef = $ConfigItemObject->DefinitionGet(
ClassID => 123,
);
DefinitionAdd()
add a new definition
my $DefinitionID = $ConfigItemObject->DefinitionAdd(
ClassID => 123,
Definition => 'the definition code',
UserID => 1,
);
DefinitionCheck()
check the syntax of a new definition
my $True = $ConfigItemObject->DefinitionCheck(
Definition => 'the definition code',
CheckSubElement => 1, # (optional, default 0, to check sub elements recursively)
);
_DefinitionPrepare()
Prepare the syntax of a new definition
my $True = $ConfigItemObject->_DefinitionPrepare(
DefinitionRef => $ArrayRef,
);
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.