-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathitem.json
More file actions
221 lines (221 loc) · 12.2 KB
/
item.json
File metadata and controls
221 lines (221 loc) · 12.2 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
{
"system_name": "File Types (demo-look)",
"name_single": "File Type",
"short_description": "File Type",
"php_postsavehook": "",
"php_before_save": "[CUSTOMCODE=saveGUIDPower]",
"php_getlistquery": "",
"php_getitems": "",
"ajax_input": {
"ajax_input0": {
"value_name": "guid",
"task_name": "getFileTypeDetails",
"input_default": "NULL",
"input_filter": "STRING",
"method_name": "getFileTypeDetails",
"user_check": "1"
},
"ajax_input1": {
"value_name": "target",
"task_name": "getFileTypeDetails",
"input_default": "NULL",
"input_filter": "BASE64",
"method_name": "getFileTypeDetails",
"user_check": "1"
},
"ajax_input2": {
"value_name": "guid",
"task_name": "uploadFile",
"input_default": "NULL",
"input_filter": "STRING",
"method_name": "uploadFile",
"user_check": "1"
},
"ajax_input3": {
"value_name": "entity",
"task_name": "uploadFile",
"input_default": "NULL",
"input_filter": "STRING",
"method_name": "uploadFile",
"user_check": "1"
},
"ajax_input4": {
"value_name": "target",
"task_name": "uploadFile",
"input_default": "NULL",
"input_filter": "BASE64",
"method_name": "uploadFile",
"user_check": "1"
},
"ajax_input5": {
"value_name": "guid",
"task_name": "deleteFile",
"input_default": "NULL",
"input_filter": "STRING",
"method_name": "deleteFile",
"user_check": "1"
},
"ajax_input6": {
"value_name": "entity",
"task_name": "displayFiles",
"input_default": "NULL",
"input_filter": "STRING",
"method_name": "displayFiles",
"user_check": "1"
},
"ajax_input7": {
"value_name": "target",
"task_name": "displayFiles",
"input_default": "NULL",
"input_filter": "BASE64",
"method_name": "displayFiles",
"user_check": "1"
}
},
"source": 2,
"icon": "",
"php_batchmove": "",
"add_fadein": 1,
"description": "",
"icon_category": "",
"icon_add": "",
"php_allowedit": "",
"php_after_delete": "",
"php_after_cancel": "",
"type": 1,
"php_after_publish": "",
"mysql_table_charset": "utf8mb4",
"name_list": "File Types",
"addpermissions": {
"addpermissions0": {
"action": "view.edit",
"implementation": 3
},
"addpermissions1": {
"action": "view.edit.own",
"implementation": 3
},
"addpermissions2": {
"action": "view.edit.state",
"implementation": 3
},
"addpermissions3": {
"action": "view.edit.access",
"implementation": 3
},
"addpermissions4": {
"action": "view.edit.created_by",
"implementation": 3
},
"addpermissions5": {
"action": "view.edit.created",
"implementation": 3
},
"addpermissions6": {
"action": "view.create",
"implementation": 3
},
"addpermissions7": {
"action": "view.delete",
"implementation": 3
},
"addpermissions8": {
"action": "view.access",
"implementation": 3
}
},
"php_getitem": "",
"php_getitems_after_all": "",
"addtabs": null,
"php_getform": "[CUSTOMCODE=setGUIDFormPower]",
"php_save": "",
"php_allowadd": "",
"addlinked_views": null,
"php_before_cancel": "",
"php_batchcopy": "",
"alias_builder_type": 0,
"php_before_publish": "",
"php_before_delete": "",
"php_document": "\/\/ Joomla___7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('demolookfiledisplay', $displayData);",
"alias_builder": null,
"mysql_table_row_format": "DYNAMIC",
"sql": "--\r\n-- Dumping data for table `#__[[[component]]]_file_type`\r\n--\r\n\r\nINSERT INTO `#__[[[component]]]_file_type` (`id`, `crop`, `document_formats`, `download_access`, `file_formats`, `guid`, `image_formats`, `media_formats`, `name`, `path`, `quantity`, `target`, `type`, `params`, `published`, `created`, `modified`, `version`, `hits`, `access`, `ordering`, `metakey`, `metadesc`, `metadata`) VALUES\r\n(1, '', '{\\\"0\\\":\\\"pdf\\\"}', 1, '', '60834e02-bd0b-40aa-b0fe-a40bba225568', '', '', 'Document', '\/documents', 0, '{\\\"0\\\":\\\"look\\\"}', 2, '', 1, '2019-09-03 22:39:21', '2019-09-03 22:44:23', 1, 0, 1, 1, '', '', '{\\\"robots\\\":\\\"\\\",\\\"author\\\":\\\"\\\",\\\"rights\\\":\\\"\\\"}'),\r\n(2, '', '{\\\"0\\\":\\\"ods\\\",\\\"1\\\":\\\"xls\\\",\\\"2\\\":\\\"xlsx\\\",\\\"3\\\":\\\"csv\\\",\\\"4\\\":\\\"tsv\\\"}', 1, '', 'cdb197b7-f47c-4577-8a94-0300f559936b', '', '', 'Import', '\/imports', 0, '{\\\"0\\\":\\\"importer\\\"}', 2, '', 1, '2019-09-03 22:39:21', '2019-09-03 22:44:23', 1, 0, 1, 1, '', '', '{\\\"robots\\\":\\\"\\\",\\\"author\\\":\\\"\\\",\\\"rights\\\":\\\"\\\"}'),\r\n(3, '{\\\"crop0\\\":{\\\"name\\\":\\\"main__{number}_{random}.{extension}\\\",\\\"height\\\":1080,\\\"width\\\":1080},\\\"crop1\\\":{\\\"name\\\":\\\"thumb__{number}_{random}.{extension}\\\",\\\"height\\\":400,\\\"width\\\":400},\\\"crop2\\\":{\\\"name\\\":\\\"icon__{number}_{random}.{extension}\\\",\\\"height\\\":50,\\\"width\\\":50}}', '', 1, '', '03267612-a884-4dd2-a831-86f2bc2f9e2a', '{\\\"0\\\":\\\"jpeg\\\",\\\"1\\\":\\\"jpg\\\",\\\"2\\\":\\\"png\\\"}', '', 'Images', '\/images', 1, '{\\\"0\\\":\\\"look\\\"}', 1, NULL, 1, '2025-10-17 14:27:03', NULL, 1, 0, 1, 2, '', '', '{\\\"robots\\\":\\\"\\\",\\\"author\\\":\\\"\\\",\\\"rights\\\":\\\"\\\"}');",
"add_category_submenu": 1,
"php_ajaxmethod": "\t\/**\r\n\t * Get the file type details, if it exists.\r\n\t *\r\n\t * @param string $guid The file type guid\r\n\t * @param string $target The target entity name\r\n\t *\r\n\t * @return array\r\n\t * @since 5.0.2\r\n\t *\/\r\n\tpublic function getFileTypeDetails(string $guid, string $target): array\r\n\t{\r\n\t\tif (Super___9c513baf_b279_43fd_ae29_a585c8cbc4f0___Power::valid($guid))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$target = base64_decode($target);\r\n\t\t\t\t$type = Super___884eca78_281f_4eab_b962_d97e355af16d___Power::_('File.Type')->get($guid, $target);\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $error)\r\n\t\t\t{\r\n\t\t\t\treturn ['error' => $error->getMessage()];\r\n\t\t\t}\r\n\r\n\t\t\tif ($type !== null)\r\n\t\t\t{\r\n\t\t\t\treturn ['data' => $type];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ['error' => Text::_('File type details could not be found')];\r\n\t}\r\n\r\n\t\/**\r\n\t * Upload a file, of a given file type and link it to an entity.\r\n\t *\r\n\t * @param string $guid The file type guid\r\n\t * @param string $entity The entity guid\r\n\t * @param string $target The target entity name\r\n\t *\r\n\t * @return array\r\n\t * @since 5.0.2\r\n\t *\/\r\n\tpublic function uploadFile(string $guid, string $entity, string $target): array\r\n\t{\r\n\t\tif (Super___9c513baf_b279_43fd_ae29_a585c8cbc4f0___Power::valid($guid)\r\n\t\t\t&& Super___9c513baf_b279_43fd_ae29_a585c8cbc4f0___Power::valid($entity))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$target = base64_decode($target);\r\n\t\t\t\tSuper___884eca78_281f_4eab_b962_d97e355af16d___Power::_('File.Manager')->upload($guid, $entity, $target);\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $error)\r\n\t\t\t{\r\n\t\t\t\treturn ['error' => $error->getMessage()];\r\n\t\t\t}\r\n\r\n\t\t\treturn ['success' => Text::_('The file was successfully uploaded')];\r\n\t\t}\r\n\r\n\t\treturn ['error' => Text::_('The file failed to upload')];\r\n\t}\r\n\r\n\t\/**\r\n\t * Delete a file of a given entity.\r\n\t *\r\n\t * @param string $guid The file guid\r\n\t *\r\n\t * @return array\r\n\t * @since 5.0.2\r\n\t *\/\r\n\tpublic function deleteFile(string $guid): array\r\n\t{\r\n\t\tif (Super___9c513baf_b279_43fd_ae29_a585c8cbc4f0___Power::valid($guid))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSuper___884eca78_281f_4eab_b962_d97e355af16d___Power::_('File.Manager')->delete($guid);\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $error)\r\n\t\t\t{\r\n\t\t\t\treturn ['error' => $error->getMessage()];\r\n\t\t\t}\r\n\r\n\t\t\treturn ['success' => Text::_('The file was successfully deleted')];\r\n\t\t}\r\n\r\n\t\treturn ['error' => Text::_('The file could not be deleted')];\r\n\t}\r\n\r\n\t\/**\r\n\t * Load the display of the files linked this entity.\r\n\t *\r\n\t * @param string $entity The entity guid\r\n\t * @param string $target The target entity name\r\n\t *\r\n\t * @return array\r\n\t * @since 5.0.2\r\n\t *\/\r\n\tpublic function displayFiles(string $entity, string $target): array\r\n\t{\r\n\t\tif (Super___9c513baf_b279_43fd_ae29_a585c8cbc4f0___Power::valid($entity))\r\n\t\t{\r\n\t\t\t$display = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$target = base64_decode($target);\r\n\t\t\t\t$data = Super___884eca78_281f_4eab_b962_d97e355af16d___Power::_('File.Display')->get($entity, $target);\r\n\r\n\t\t\t\tif ($data !== null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$displayData = ['data' => $data, 'entity' => $entity, 'target' => $target];\r\n\t\t\t\t\t$display = Joomla___7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('demolookfiledisplay', $displayData);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn ['data' => '<b>' . Text::sprintf('No files linked to %s.', $target) . '<\/b>'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $error)\r\n\t\t\t{\r\n\t\t\t\treturn ['error' => $error->getMessage()];\r\n\t\t\t}\r\n\r\n\t\t\tif (!empty($display))\r\n\t\t\t{\r\n\t\t\t\treturn ['data' => $display];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ['error' => Text::_('The file display could not be loaded')];\r\n\t}",
"add_php_getitem": 0,
"add_php_getitems": 0,
"add_css_view": 0,
"add_php_getitems_after_all": 0,
"css_view": "",
"add_php_getlistquery": 0,
"add_css_views": 0,
"add_php_getform": 1,
"css_views": "",
"add_php_before_save": 1,
"add_javascript_view_file": 0,
"add_php_save": 0,
"javascript_view_file": "",
"add_php_postsavehook": 0,
"add_javascript_view_footer": 0,
"add_php_allowadd": 0,
"javascript_view_footer": "",
"add_php_allowedit": 0,
"add_javascript_views_file": 0,
"add_php_before_cancel": 0,
"javascript_views_file": "",
"add_php_after_cancel": 0,
"add_javascript_views_footer": 0,
"add_php_batchcopy": 0,
"javascript_views_footer": "",
"add_php_batchmove": 0,
"add_custom_button": 0,
"add_php_before_publish": 0,
"custom_button": null,
"add_php_after_publish": 0,
"php_controller": "",
"add_php_before_delete": 0,
"php_model": "",
"add_php_after_delete": 0,
"php_controller_list": "",
"add_php_document": 1,
"php_model_list": "",
"mysql_table_engine": "InnoDB",
"add_view_toolbar": 0,
"mysql_table_collate": "utf8mb4_unicode_ci",
"view_toolbar": "",
"add_sql": 1,
"add_views_toolbar": 0,
"views_toolbar": "",
"guid": "19a973ea-cdfa-4c79-bbbd-1b8a37286b27",
"add_php_ajax": 1,
"@dependencies": [
{
"key": "admin_view",
"value": "19a973ea-cdfa-4c79-bbbd-1b8a37286b27",
"entity": "admin_fields",
"table": "#__componentbuilder_admin_fields",
"direction": "in"
},
{
"key": "function_name",
"value": "saveGUIDPower",
"entity": "custom_code",
"table": "#__componentbuilder_custom_code",
"direction": "out"
},
{
"key": "function_name",
"value": "setGUIDFormPower",
"entity": "custom_code",
"table": "#__componentbuilder_custom_code",
"direction": "out"
},
{
"key": "guid",
"value": "6e4e5acc-8a7c-49ca-be53-8f8d95bd4163",
"entity": "layout",
"table": "#__componentbuilder_layout",
"direction": "out"
}
]
}