Vinoteca: модуль, шаблон и компоненты интернет-магазина вина на 1С-Битрикс
This commit is contained in:
commit
f6ba0d2174
470 files changed
+26454
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Bitrix\Main\Localization\Loc;
|
||||
|
||||
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
|
||||
die();
|
||||
}
|
||||
|
||||
Loc::loadMessages(__FILE__);
|
||||
|
||||
class JinovePersonalNavComponent extends CBitrixComponent
|
||||
{
|
||||
private const SECTIONS = ["profile" => "", "orders" => "orders/", "reviews" => "reviews/"];
|
||||
|
||||
public function executeComponent(): array
|
||||
{
|
||||
$items = [];
|
||||
foreach (self::SECTIONS as $code => $path) {
|
||||
$items[] = [
|
||||
"CODE" => $code,
|
||||
"URL" => SITE_DIR . "personal/" . $path,
|
||||
"ACTIVE" => ($this->arParams["ACTIVE"] ?? "") === $code,
|
||||
];
|
||||
}
|
||||
$this->arResult = ["ITEMS" => $items];
|
||||
$this->includeComponentTemplate();
|
||||
|
||||
return $this->arResult;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user