1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
currency.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup;
4
5
use Bitrix\Main\Loader;
6
use Bitrix\Currency\CurrencyManager;
7
use Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields;
8
9
final
class
Currency
implements
Fields\IField
,
Fields\IAvailableFieldList
10
{
16
public
static
function
getDefaultValue
()
17
{
18
return
in_array($current = self::getDefaultCurrency(),static::getCurrencyList())? $current :
'USD'
;
19
}
20
21
private
static
function
getDefaultCurrency()
22
{
23
if
(Loader::includeModule(
'bitrix24'
) && is_array($currencies = \CBitrix24::GetAvBillingCurrencies()))
24
{
25
$currentCurrency = current($currencies);
26
return
$currentCurrency !==
'RUR'
? $currentCurrency :
'RUB'
;
27
}
28
29
if
(Loader::includeModule(
'currency'
))
30
{
31
return
CurrencyManager::getBaseCurrency();
32
}
33
return
false
;
34
}
35
45
public
static
function
checkValue
($value): bool
46
{
47
if
(is_string($value))
48
{
49
return
in_array($value,static::getAvailableValues());
50
}
51
return
false
;
52
}
53
60
public
static
function
getAvailableValues
():
array
61
{
62
return
static::getCurrencyList();
63
}
64
68
public
static
function
available
(): bool
69
{
70
return
true
;
71
72
}
73
77
public
static
function
required
(): bool
78
{
79
return
true
;
80
}
81
82
public
static
function
getCurrencyList
() :
array
83
{
84
return
[
85
'DZD'
,
'ARS'
,
'AUD'
,
'BDT'
,
'BOB'
,
'BRL'
,
'GBP'
,
'CAD'
,
'CLP'
,
'CNY'
,
'COP'
,
'CRC'
,
'CZK'
,
'DKK'
,
'EGP'
,
'EUR'
,
86
'GTQ'
,
'HNL'
,
'HKD'
,
'HUF'
,
'ISK'
,
'INR'
,
'IDR'
,
'ILS'
,
'JPY'
,
'KES'
,
'KRW'
,
'MOP'
,
'MYR'
,
'MXN'
,
'NZD'
,
'NIO'
,
87
'NGN'
,
'NOK'
,
'PKR'
,
'PYG'
,
'PEN'
,
'PHP'
,
'PLN'
,
'QAR'
,
'RON'
,
'RUB'
,
'SAR'
,
'SGD'
,
'ZAR'
,
'SEK'
,
'CHF'
,
'TWD'
,
88
'THB'
,
'TRY'
,
'AED'
,
'USD'
,
'UYU'
,
'VEF'
,
'VND'
89
];
90
}
91
}
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency
Определения
currency.php:10
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\getDefaultValue
static getDefaultValue()
Определения
currency.php:16
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\checkValue
static checkValue($value)
Определения
currency.php:45
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\getAvailableValues
static getAvailableValues()
Определения
currency.php:60
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\getCurrencyList
static getCurrencyList()
Определения
currency.php:82
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\available
static available()
Определения
currency.php:68
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\Setup\Currency\required
static required()
Определения
currency.php:77
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\IAvailableFieldList
Определения
iavailablefieldlist.php:6
Bitrix\Seo\BusinessSuite\Configuration\Facebook\Fields\IField
Определения
ifield.php:6
bitrix
modules
seo
lib
businesssuite
configuration
facebook
fields
setup
currency.php
Создано системой
1.14.0