1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
moneyconfig.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Grid\Column\Editable;
4
5
use Bitrix\Currency\CurrencyManager;
6
use Bitrix\Main\Grid\Editor\Types;
7
use Bitrix\Main\Loader;
8
12
class
MoneyConfig
extends
Config
13
{
18
private
array
$currencyList;
19
private
?
bool
$isHtml;
20
24
public
function
__construct
(
string
$name, ?
array
$currencyList =
null
)
25
{
26
parent::__construct($name, Types::MONEY);
27
28
if
(isset($currencyList))
29
{
30
$this->currencyList = $currencyList;
31
}
32
elseif
(
Loader::includeModule
(
'currency'
))
33
{
34
$this->currencyList = CurrencyManager::getSymbolList();
35
$this->
setHtml
(
true
);
36
}
37
else
38
{
39
$this->currencyList = [];
40
}
41
}
42
50
public
function
setHtml
(
bool
$value): self
51
{
52
$this->isHtml = $value;
53
54
return
$this;
55
}
56
62
private
function
getCurrenyListAsDropdown():
array
63
{
64
$result
= [];
65
66
foreach
($this->currencyList as $value =>
$name
)
67
{
68
$result
[] = [
69
'VALUE'
=> $value,
70
'NAME'
=>
$name
,
71
];
72
}
73
74
return
$result
;
75
}
76
80
public
function
toArray
():
array
81
{
82
$result
= parent::toArray();
83
84
$result
[
'CURRENCY_LIST'
] = $this->getCurrenyListAsDropdown();
85
86
if
(isset($this->isHtml))
87
{
88
$result
[
'HTML_ENTITY'
] = $this->isHtml;
89
}
90
91
return
$result
;
92
}
93
}
Bitrix\Main\Grid\Column\Editable\Config
Определения
config.php:11
Bitrix\Main\Grid\Column\Editable\MoneyConfig
Определения
moneyconfig.php:13
Bitrix\Main\Grid\Column\Editable\MoneyConfig\setHtml
setHtml(bool $value)
Определения
moneyconfig.php:50
Bitrix\Main\Grid\Column\Editable\MoneyConfig\toArray
toArray()
Определения
moneyconfig.php:80
Bitrix\Main\Grid\Column\Editable\MoneyConfig\__construct
__construct(string $name, ?array $currencyList=null)
Определения
moneyconfig.php:24
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$name
$name
Определения
menu_edit.php:35
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
bitrix
modules
main
lib
grid
column
editable
moneyconfig.php
Создано системой
1.14.0