/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/Layout/AclCondition.php
48 строк
991 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ namespace Magento\Framework\View\Layout; use Magento\Framework\View\Layout\Condition\VisibilityConditionInterface; /** * Check that user is allowed to watch resource with given acl resource.. */ class AclCondition implements VisibilityConditionInterface { /** * Unique name. */ const NAME = 'acl'; /** * @var \Magento\Framework\AuthorizationInterface */ private $authorization; /** * @param \Magento\Framework\AuthorizationInterface $authorization */ public function __construct(\Magento\Framework\AuthorizationInterface $authorization) { $this->authorization = $authorization; } /** * @inheritdoc */ public function isVisible(array $arguments) { return $this->authorization->isAllowed($arguments['acl']); } /** * @return string */ public function getName() { return self::NAME; } }