46 'data_type' =>
'string',
48 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_ID_TITLE'),
51 'data_type' =>
'string',
52 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_NAME_TITLE'),
55 'data_type' =>
'string',
56 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_DESCRIPTION_TITLE'),
59 'data_type' =>
'string',
60 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_PROPERTY_TYPE_TITLE'),
63 'data_type' =>
'boolean',
64 'values' => [
'N',
'Y'],
65 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_IS_REQUIRED_TITLE'),
68 'data_type' =>
'boolean',
69 'values' => [
'N',
'Y'],
70 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_IS_MULTIPLE_TITLE'),
72 'PROPERTY_OPTIONS' => [
73 'data_type' =>
'string',
75 'validation' => [__CLASS__,
'validateTextField'],
76 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_PROPERTY_OPTIONS_TITLE'),
78 'PROPERTY_SETTINGS' => [
79 'data_type' =>
'string',
81 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_PROPERTY_SETTINGS_TITLE'),
84 'data_type' =>
'string',
86 'validation' => [__CLASS__,
'validateTextField'],
87 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_PROPERTY_VALUE_TITLE'),
90 'data_type' =>
'datetime',
91 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_CREATED_DATE_TITLE'),
94 'data_type' =>
'integer',
95 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_CREATED_BY_TITLE'),
98 'data_type' =>
'string',
99 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_VISIBILITY_TITLE'),
102 'data_type' =>
'datetime',
103 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_MODIFIED_DATE_TITLE'),
106 'data_type' =>
'integer',
107 'title' => Main\Localization\Loc::getMessage(
'BIZPROC_WF_TYPE_GLOBALS_MANAGER_COLUMN_MODIFIED_BY_TITLE'),
129 $property = static::normalizePropertyForUpsert($property, $userId);
133 'NAME' => trim($property[
'Name']),
134 'DESCRIPTION' => $property[
'Description'],
135 'PROPERTY_TYPE' => $property[
'Type'],
136 'IS_REQUIRED' => $property[
'Required'] ?
'Y' :
'N',
137 'IS_MULTIPLE' => $property[
'Multiple'] ?
'Y' :
'N',
138 'PROPERTY_OPTIONS' => $property[
'Options'],
139 'PROPERTY_VALUE' => $property[
'Default'],
140 'VISIBILITY' => $property[
'Visibility'],
141 'CREATED_BY' => $property[
'CreatedBy'],
142 'CREATED_DATE' => $property[
'CreatedDate'],
143 'MODIFIED_DATE' => $property[
'ModifiedDate'],
144 'MODIFIED_BY' => $property[
'ModifiedBy'],
147 if ($userId ===
null)
149 unset($fields[
'CREATED_BY'], $fields[
'CREATED_DATE'], $fields[
'MODIFIED_BY'], $fields[
'MODIFIED_DATE']);
152 $oldProperty = static::getByPrimary((
string)$constId)->fetch();
155 if (isset($oldProperty[
'CREATED_BY']))
157 unset($fields[
'CREATED_BY'], $fields[
'CREATED_DATE']);
160 $result = static::update($constId, $fields);
164 $fields[
'ID'] = $constId;
165 $result = static::add($fields);