1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
htmlhelper.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Discount\Preset;
4
5final class HtmlHelper
6{
7 public static function generateSelect($id, array $selectData, $value, array $params = []): string
8 {
9 $html = '<select name="' . $id . '" id="' . $id . '"';
10 foreach ($params as $param)
11 {
12 $html .= ' ' . $param;
13 }
14 $html .= '>';
15
16 foreach ($selectData as $key => $val)
17 {
18 $html .=
19 '<option value="' . htmlspecialcharsbx($key) . '"' . ($value == $key ? ' selected' : '') . '>'
20 . htmlspecialcharsex($val)
21 . '</option>'
22 ;
23 }
24 $html .= '</select>';
25
26 return $html;
27 }
28
29 public static function generateMultipleSelect($id, array $selectData, array $values, array $params = []): string
30 {
31 $html = '<select multiple name="' . $id . '" id="' . $id . '"';
32 foreach ($params as $param)
33 {
34 $html .= ' ' . $param;
35 }
36 $html .= '>';
37
38 foreach ($selectData as $key => $val)
39 {
40 $html .=
41 '<option value="' . htmlspecialcharsbx($key) . '"' . (in_array($key, $values) ? ' selected' : '') . '>'
42 . htmlspecialcharsex($val)
43 . '</option>'
44 ;
45 }
46 $html .= '</select>';
47
48 return $html;
49 }
50}
static generateMultipleSelect($id, array $selectData, array $values, array $params=[])
Определения htmlhelper.php:29
static generateSelect($id, array $selectData, $value, array $params=[])
Определения htmlhelper.php:7
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
if(empty($signedUserToken)) $key
Определения quickway.php:257
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$val
Определения options.php:1793