Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
config.php
1<?php
2namespace Bitrix\Landing;
3
4class Config
5{
10 protected static function getDefaultConfig()
11 {
12 return [
13 'js_core_public' => [
14 'landing_core'
15 ],
16 'js_core_edit' => [
17 'landing_core'
18 ],
19 'disable_namespace' => [],
20 'enable_namespace' => [],
21 'public_wrapper_block' => true,
22 'icon_src' => '/bitrix/templates/landing24/assets/vendor/icon/',
23 'icon_vendors' => [
24 'fa',
25 'fat',
26 'fal',
27 'far',
28 'fas',
29 'fab',
30 'et-icon',
31 'hs-icon',
32 'icon-christmas',
33 'icon-clothes',
34 'icon-communication',
35 'icon-education',
36 'icon-electronics',
37 'icon-finance',
38 'icon-food',
39 'icon-furniture',
40 'icon-hotel-restaurant',
41 'icon-media',
42 'icon-medical',
43 'icon-music',
44 'icon-real-estate',
45 'icon-science',
46 'icon-sport',
47 'icon-transport',
48 'icon-travel',
49 'icon-weather',
50 'icon',
51 ],
52 'icon_vendors_config' => [
53 'fat' => [
54 'class_prefix' => 'fa',
55 ],
56 'fal' => [
57 'class_prefix' => 'fa',
58 ],
59 'far' => [
60 'class_prefix' => 'fa',
61 ],
62 'fas' => [
63 'class_prefix' => 'fa',
64 ],
65 'fab' => [
66 'class_prefix' => 'fa',
67 ],
68 ],
69 ];
70 }
71
76 protected static function loadConfig()
77 {
78 static $config = null;
79
80 if ($config === null)
81 {
82 $config = self::getDefaultConfig();
83
84 $siteId = Manager::getMainSiteId();
85 $siteTemplateId = Manager::getTemplateId($siteId);
86 $siteTemplatePath = \getLocalPath('templates/' . $siteTemplateId, BX_PERSONAL_ROOT);
87 $configPath = Manager::getDocRoot() . $siteTemplatePath . '/.config.php';
88
89 if (file_exists($configPath))
90 {
91 $config = include_once $configPath;
92 }
93 }
94
95 return $config;
96 }
97
103 public static function get($code)
104 {
105 $config = self::loadConfig();
106
107 if (isset($config[$code]))
108 {
109 return $config[$code];
110 }
111
112 return null;
113 }
114}
static getDefaultConfig()
Definition config.php:10
static loadConfig()
Definition config.php:76