-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathTriggerOnAttachmentCreate.php
More file actions
46 lines (42 loc) · 1.57 KB
/
TriggerOnAttachmentCreate.php
File metadata and controls
46 lines (42 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class TriggerOnAttachmentCreate
*
* @since 3.3.0
*/
class TriggerOnAttachmentCreate extends TriggerOnObject
{
/**
* @inheritDoc
* @throws \CoreException
* @throws \Exception
*/
public static function Init()
{
$aParams =
[
"category" => "grant_by_profile,core/cmdb,application",
"key_type" => "autoincrement",
"name_attcode" => "description",
"complementary_name_attcode" => ['finalclass', 'target_class'],
"state_attcode" => "",
"reconc_keys" => ['description'],
"db_table" => "priv_trigger_onattcreate",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
];
MetaModel::Init_Params($aParams);
MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeBoolean("file_in_email", ["sql" => 'file_in_email', "is_null_allowed" => false, "default_value" => 'true', "allowed_values" => null, "depends_on" => [], "always_load_in_tables" => false]));
// Display lists
MetaModel::Init_SetZListItems('details', ['description', 'context', 'filter', 'action_list', 'target_class', 'file_in_email']); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', ['finalclass', 'target_class']); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', ['description', 'target_class']); // Criteria of the std search form
}
}