Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
code.php
1<?php
2
4
5class Code extends Renderer
6{
7 const JS_TYPE_CODE = 'code';
8
9 const SIZE_RESTRICTION = 2097152;
10
11 public static function getJsType()
12 {
13 return self::JS_TYPE_CODE;
14 }
15
16 public static function getSizeRestriction()
17 {
19 }
20
21 public static function getAllowedContentTypes()
22 {
23 return [
24 'application/javascript',
25 'application/ecmascript',
26 'application/x-ecmascript',
27 'application/x-javascript',
28 'text/ecmascript',
29 'text/javascript1.0',
30 'text/javascript1.1',
31 'text/javascript1.2',
32 'text/javascript1.3',
33 'text/javascript1.4',
34 'text/javascript1.5',
35 'text/jscript',
36 'text/livescript',
37 'text/x-ecmascript',
38 'text/x-javascript',
39 'text/javascript',
40 'application/json',
41 'text/html',
42 'text/css',
43 'text/php',
44 'application/x-php',
45 'application/x-httpd-php',
46 'application/x-httpd-php',
47 'application/x-httpd-php',
48 'application/x-httpd-php',
49 'text/x-comma-separated-values',
50 'text/tab-separated-values',
51 'text/csv',
52 'text/csv-schema',
53 'application/xhtml+xml',
54 'text/plain',
55 'application/xml',
56 'text/markdown',
57 'text/x-script.phyton',
58 'application/x-bsh',
59 'application/x-sh',
60 'application/x-shar',
61 'text/x-script.sh',
62 'text/x-c',
63 ];
64 }
65
66 public function render()
67 {
68 return null;
69 }
70
71 public function getData()
72 {
73 return [
74 'src' => $this->sourceUri,
75 ];
76 }
77}