1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
tools.php
См. документацию.
1
<?
8
namespace
Bitrix\Fileman\Block;
9
10
use Bitrix\Main\Localization\Loc;
11
12
Loc::loadMessages(__FILE__);
13
14
class
Tools
15
{
19
public
static
function
getControlInput
()
20
{
21
return
'<input type="text" data-bx-editor-tool-input="item" value="">'
;
22
}
23
27
public
static
function
getControlSelect
(
array
$optionList, $haveDefault =
true
)
28
{
29
if
($haveDefault)
30
{
31
$optionList =
array
(
''
=> Loc::getMessage(
'BLOCK_EDITOR_TOOLS_DEFAULT'
)) + $optionList;
32
}
33
34
$options
=
''
;
35
foreach
($optionList as $value =>
$name
)
36
{
37
$value =
htmlspecialcharsbx
($value);
38
$name
=
htmlspecialcharsbx
(
$name
);
39
$options
.=
'<option value="'
. $value .
'">'
.
$name
.
'</option>'
;
40
}
41
return
'<select data-bx-editor-tool-input="item">'
.$options .
'</select>'
;
42
}
43
47
public
static
function
getControlColor
()
48
{
49
return
'<input type="hidden" data-bx-editor-tool-input="item" class="bx-editor-color-picker">'
.
50
'<span class="bx-editor-color-picker-view"></span>'
.
51
'<span class="bx-editor-color-picker-text">'
. Loc::getMessage(
'BLOCK_EDITOR_TOOLS_COLOR'
) .
'</span>'
;
52
}
53
57
public
static
function
getControlPaddingBottoms
()
58
{
59
$options
=
array
(0, 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 100, 120, 140, 160);
60
61
$optionList =
array
();
62
foreach
(
$options
as $v)
63
{
64
$v .=
'px'
;
65
$optionList[$v] = $v;
66
}
67
68
return
static::getControlSelect($optionList);
69
}
70
74
public
static
function
getControlBorderRadius
()
75
{
76
$optionList =
array
(
77
''
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_BORDER_RADIUS_SQUARE'
),
78
'4px'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_BORDER_RADIUS_ROUND1'
),
79
'7px'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_BORDER_RADIUS_ROUND2'
),
80
'10px'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_BORDER_RADIUS_ROUND3'
),
81
'15px'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_BORDER_RADIUS_ROUND4'
),
82
);
83
return
static::getControlSelect($optionList,
false
);
84
}
85
89
public
static
function
getControlTextDecoration
()
90
{
91
$optionList =
array
(
92
'none'
=> Loc::getMessage(
'BLOCK_EDITOR_COMMON_NO'
),
93
'underline'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_DECORATION_UNDERLINE'
),
94
'overline'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_DECORATION_OVERLINE'
),
95
'line-through'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_DECORATION_THROUGH'
),
96
);
97
return
static::getControlSelect($optionList);
98
}
99
103
public
static
function
getControlTextAlign
()
104
{
105
$optionList =
array
(
106
'left'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_ALIGN_LEFT'
),
107
'center'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_ALIGN_CENTER'
),
108
'right'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_TEXT_ALIGN_RIGHT'
),
109
);
110
return
static::getControlSelect($optionList,
false
);
111
}
112
116
public
static
function
getControlAlign
()
117
{
118
$optionList =
array
(
119
'left'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_ALIGN_LEFT'
),
120
'top'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_ALIGN_TOP'
),
121
'right'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_ALIGN_RIGHT'
),
122
'bottom'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_ALIGN_BOTTOM'
),
123
);
124
return
static::getControlSelect($optionList,
false
);
125
}
126
130
public
static
function
getControlFontFamily
()
131
{
132
$optionList =
array
(
133
'\'
Times New Roman\
', Times'
=>
'Times New Roman'
,
134
'\'
Courier New\
''
=>
'Courier New'
,
135
'Arial, Helvetica'
=>
'Arial / Helvetica'
,
136
'\'
Arial Black\
', Gadget'
=>
'Arial Black'
,
137
'Tahoma, Geneva'
=>
'Tahoma / Geneva'
,
138
'Verdana'
=>
'Verdana'
,
139
'Georgia, serif'
=>
'Georgia'
,
140
'monospace'
=>
'monospace'
,
141
);
142
return
static::getControlSelect($optionList,
false
);
143
}
144
148
public
static
function
getControlLineHeight
()
149
{
150
$options
=
array
(5, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 35, 40, 45, 50);
151
152
$optionList =
array
();
153
foreach
(
$options
as $v)
154
{
155
$v .=
'px'
;
156
$optionList[$v] = $v;
157
}
158
159
return
static::getControlSelect($optionList);
160
}
161
165
public
static
function
getControlFontWeight
()
166
{
167
$optionList =
array
(
168
'normal'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_FONT_WEIGHT_NORMAL'
),
169
'bold'
=> Loc::getMessage(
'BLOCK_EDITOR_CTRL_FONT_WEIGHT_BOLD'
),
170
'100'
=>
'100'
,
171
'200'
=>
'200'
,
172
'300'
=>
'300'
,
173
'400'
=>
'400'
,
174
'500'
=>
'500'
,
175
'600'
=>
'600'
,
176
'700'
=>
'700'
,
177
'800'
=>
'800'
,
178
'900'
=>
'900'
,
179
);
180
return
static::getControlSelect($optionList);
181
}
182
186
public
static
function
getControlFontSize
()
187
{
188
$options
=
array
(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 35, 40, 45, 50);
189
190
$optionList =
array
();
191
foreach
(
$options
as $v)
192
{
193
$v .=
'px'
;
194
$optionList[$v] = $v;
195
}
196
return
static::getControlSelect($optionList);
197
}
198
}
Bitrix\Fileman\Block\Tools
Определения
tools.php:15
Bitrix\Fileman\Block\Tools\getControlTextAlign
static getControlTextAlign()
Определения
tools.php:103
Bitrix\Fileman\Block\Tools\getControlTextDecoration
static getControlTextDecoration()
Определения
tools.php:89
Bitrix\Fileman\Block\Tools\getControlColor
static getControlColor()
Определения
tools.php:47
Bitrix\Fileman\Block\Tools\getControlLineHeight
static getControlLineHeight()
Определения
tools.php:148
Bitrix\Fileman\Block\Tools\getControlAlign
static getControlAlign()
Определения
tools.php:116
Bitrix\Fileman\Block\Tools\getControlSelect
static getControlSelect(array $optionList, $haveDefault=true)
Определения
tools.php:27
Bitrix\Fileman\Block\Tools\getControlInput
static getControlInput()
Определения
tools.php:19
Bitrix\Fileman\Block\Tools\getControlPaddingBottoms
static getControlPaddingBottoms()
Определения
tools.php:57
Bitrix\Fileman\Block\Tools\getControlFontWeight
static getControlFontWeight()
Определения
tools.php:165
Bitrix\Fileman\Block\Tools\getControlBorderRadius
static getControlBorderRadius()
Определения
tools.php:74
Bitrix\Fileman\Block\Tools\getControlFontSize
static getControlFontSize()
Определения
tools.php:186
Bitrix\Fileman\Block\Tools\getControlFontFamily
static getControlFontFamily()
Определения
tools.php:130
$options
$options
Определения
commerceml2.php:49
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
htmlspecialcharsbx
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения
tools.php:2701
$name
$name
Определения
menu_edit.php:35
bitrix
modules
fileman
lib
block
tools.php
Создано системой
1.14.0