2namespace Bitrix\Landing\Subtype;
4use \Bitrix\Landing\Landing;
5use \Bitrix\Landing\Hook\Page\Settings;
6use \Bitrix\Main\Localization\Loc;
8Loc::loadMessages(__FILE__);
22 if (!isset($manifest[
'attrs']) || !is_array($manifest[
'attrs']))
24 $manifest[
'attrs'] =
array();
26 if (!isset($manifest[
'attrs'][
'.navbar-collapse']))
28 $manifest[
'attrs'][
'.navbar-collapse'] =
array(
35 if (!isset($manifest[
'attrs'][
'button.navbar-toggler']))
37 $manifest[
'attrs'][
'button.navbar-toggler'] =
array(
40 'attribute' =>
'aria-controls',
44 'attribute' =>
'data-target',
50 $manifest[
'callbacks'] =
array(
53 $manifest = $block->getManifest();
60 $selector =
$params[
'selector'];
64 $selector =
'.landing-block-node-menu-list-item-link';
72 if (isset($manifest[
'nodes'][$selector]))
75 if ($source ==
'catalog')
77 $site = $block->getSite();
78 if (
$site[
'TYPE'] ==
'STORE')
80 $menuItems = self::getCatalogMenu(
86 else if ($source ==
'personal')
88 $menuItems = self::getPersonalMenu();
92 if (!empty($menuItems))
94 $block->updateNodes(
array(
95 $selector => $menuItems
100 else if ($source ==
'structure')
106 $eventManager->addEventHandler(
'landing',
'onAfterDemoCreate',
116 $navbarCollapseSection =
$params[
'navbarCollapseSection'] ??
'.navbar-collapse';
117 $navbarTogglerButton =
$params[
'navbarTogglerButton'] ??
'button.navbar-toggler';
120 isset($manifest[
'attrs'][$navbarCollapseSection])
121 && isset($manifest[
'attrs'][$navbarTogglerButton])
124 $newId =
'navBar' . $block->getId();
125 $block->setAttributes(
array(
126 $navbarCollapseSection =>
array(
'id' => $newId),
127 $navbarTogglerButton =>
array(
128 'aria-controls' => $newId,
129 'data-target' =>
'#' . $newId,
153 $manifest = $block->getManifest();
157 if (empty($manifest[
'menu']))
167 'ID',
'TITLE',
'FOLDER_ID'
170 'SITE_ID' => $block->getSiteId(),
174 while ($row =
$res->fetch())
176 if ($row[
'FOLDER_ID'])
181 $menu[$row[
'ID']] = [
182 'text' => $row[
'TITLE'],
183 'href' =>
'#landing' . $row[
'ID'],
192 foreach ($inFolders as $row)
194 if (isset($menu[$row[
'FOLDER_ID']]))
196 $menu[$row[
'FOLDER_ID']][
'children'][] = [
197 'text' => $row[
'TITLE'],
198 'href' =>
'#landing' . $row[
'ID'],
207 foreach ($manifest[
'menu'] as $selector => $foo)
209 $block->updateNodes([
226 $menuItems =
array();
228 if (!\
Bitrix\
Main\Loader::includeModule(
'iblock'))
233 \Bitrix\Landing\Hook::setEditMode(
true);
237 $res = \CIBlockSection::getList(
253 while ($row =
$res->fetch())
255 $menuItems[] =
array(
256 'text' => $row[
'NAME'],
257 'href' =>
'#catalogSection' . $row[
'ID'],
259 'data-url' =>
'#catalogSection' . $row[
'ID']
276 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_PERSONAL'),
277 'href' =>
'#system_personal'
280 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_ORDERS'),
281 'href' =>
'#system_personal?SECTION=orders'
284 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_ACCOUNT'),
285 'href' =>
'#system_personal?SECTION=account'
288 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_PRIVATE'),
289 'href' =>
'#system_personal?SECTION=private'
292 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_ORDERS_HISTORY'),
293 'href' =>
'#system_personal?SECTION=orders&filter_history=Y'
296 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_PROFILE'),
297 'href' =>
'#system_personal?SECTION=profile'
300 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_CART'),
301 'href' =>
'#system_cart'
304 'text' => Loc::getMessage(
'LANDING_BLOCK_ST_PERSONAL_SUBSCRIBE'),
305 'href' =>
'#system_personal?SECTION=subscribe'
static getDataForSite($id=null)
static getCatalogMenu($siteId, $count)
static redrawStructureMenu(\Bitrix\Landing\Block $block)
static prepareManifest(array $manifest, \Bitrix\Landing\Block $block=null, array $params=[])
static getList(array $parameters=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']