Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
typehelper.php
1<?php
3
6
13{
14 protected $userTypeId;
15
16 public function __construct($userTypeId)
17 {
18 $this->userTypeId = $userTypeId;
19 }
20
21 public function getCssClassName(array $additionalCss = array())
22 {
23 return trim('fields '.$this->userTypeId.' '.implode(' ', $additionalCss));
24 }
25
26 public function wrapSingleField($html, array $additionalCss = array())
27 {
28 return '<span class="'.HtmlFilter::encode(static::getCssClassName($additionalCss)).' field-item">'.$html.'</span>';
29 }
30
31 public function wrapDisplayResult($html, $additionalCss = array())
32 {
33 return '<span class="'.HtmlFilter::encode(static::getCssClassName($additionalCss)).' field-wrap">'.$html.'</span>';
34 }
35
37 {
38 return '<span class="fields separator"></span>';
39 }
40
41 public function getCloneButton($fieldName)
42 {
43 return '<input type="button" value="'.HtmlFilter::encode(Loc::getMessage('USER_TYPE_PROP_ADD')).'" onclick="BX.Main.UF.Factory.get(\''.$this->userTypeId.'\').addRow(\''.\CUtil::jsEscape($fieldName).'\', this);" />';
44 }
45}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
wrapDisplayResult($html, $additionalCss=array())
wrapSingleField($html, array $additionalCss=array())
getCssClassName(array $additionalCss=array())