Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
money.php
1<?php
3
10
11Loc::loadLanguageFile(__FILE__);
12
19class Money extends TypeBase
20{
23
27 public static function getUserTypeDescription()
28 {
30 }
31
37 public static function getPublicView($userField, $additionalParameters = [])
38 {
39 return MoneyType::renderView($userField, $additionalParameters);
40 }
41
47 public static function getPublicEdit($userField, $additionalParameters = [])
48 {
49 return MoneyType::renderEdit($userField, $additionalParameters);
50 }
51
58 public static function getSettingsHtml($userField, $additionalParameters, $fromForm)
59 {
60 return MoneyType::renderSettings($userField, $additionalParameters, $fromForm);
61 }
62
68 public static function getEditFormHtml($userField, $additionalParameters)
69 {
70 return MoneyType::renderEditForm($userField, $additionalParameters);
71 }
72
78 public static function getAdminListViewHtml($userField, $additionalParameters)
79 {
80 return MoneyType::renderAdminListView($userField, $additionalParameters);
81 }
82
88 public static function getAdminListEditHtml($userField, $additionalParameters)
89 {
90 return MoneyType::renderAdminListEdit($userField, $additionalParameters);
91 }
92
97 public static function getPublicText($userField)
98 {
99 return MoneyType::renderText($userField);
100 }
101
106 public static function GetDBColumnType($userField)
107 {
109 }
110
116 public static function OnBeforeSave($userField, $value)
117 {
118 return MoneyType::onBeforeSave($userField, $value);
119 }
120
125 public static function PrepareSettings($userField)
126 {
127 return MoneyType::prepareSettings($userField);
128 }
129
135 protected static function formatToDB($value, $currency)
136 {
137 return MoneyType::formatToDb($value, $currency);
138 }
139
144 protected static function unFormatFromDB($value)
145 {
146 return MoneyType::unFormatFromDb($value);
147 }
148
155 public static function getEditFormHtmlMulty($userField, $control)
156 {
157 return MoneyType::renderEditForm($userField, $additionalParameters);
158 }
159
165 public static function getListCurrency()
166 {
167 return Editor::getListCurrency();
168 }
169
177 protected static function getInput($userField, $fieldName, $dbValue)
178 {
179 global $APPLICATION;
180
181 ob_start();
182
183 $APPLICATION->IncludeComponent(
184 'bitrix:currency.money.input',
185 '',
186 array(
187 'CONTROL_ID' => $userField['FIELD_NAME'].'_'.Random::getString(5),
188 'FIELD_NAME' => $fieldName,
189 'VALUE' => $dbValue,
190 'EXTENDED_CURRENCY_SELECTOR' => 'Y'
191 ),
192 null,
193 array('HIDE_ICONS' => 'Y')
194 );
195
196 return ob_get_clean();
197 }
198}
static getPublicView($userField, $additionalParameters=[])
Definition money.php:37
static PrepareSettings($userField)
Definition money.php:125
static GetDBColumnType($userField)
Definition money.php:106
static formatToDB($value, $currency)
Definition money.php:135
static unFormatFromDB($value)
Definition money.php:144
static getSettingsHtml($userField, $additionalParameters, $fromForm)
Definition money.php:58
static getEditFormHtml($userField, $additionalParameters)
Definition money.php:68
static getInput($userField, $fieldName, $dbValue)
Definition money.php:177
static OnBeforeSave($userField, $value)
Definition money.php:116
static getPublicEdit($userField, $additionalParameters=[])
Definition money.php:47
static getPublicText($userField)
Definition money.php:97
static getEditFormHtmlMulty($userField, $control)
Definition money.php:155
static getAdminListEditHtml($userField, $additionalParameters)
Definition money.php:88
static getAdminListViewHtml($userField, $additionalParameters)
Definition money.php:78
static onBeforeSave(array $userField, $value)
static formatToDb(string $value, ?string $currency)
static prepareSettings(array $userField)
static loadLanguageFile($file, $language=null, $normalize=true)
Definition loc.php:224
static renderAdminListEdit(array $userField, ?array $additionalParameters)
Definition basetype.php:158
static renderEdit(array $userField, ?array $additionalParameters=[])
Definition basetype.php:92
static renderEditForm(array $userField, ?array $additionalParameters)
Definition basetype.php:126
static renderText(array $userField)
Definition basetype.php:184
static renderView(array $userField, ?array $additionalParameters=[])
Definition basetype.php:75
static renderSettings($userField, ?array $additionalParameters, $varsFromForm)
Definition basetype.php:108
static renderAdminListView(array $userField, ?array $additionalParameters)
Definition basetype.php:143