/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/Element/ButtonLockManager.php
42 строки
979 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2022 Adobe * All Rights Reserved. */ declare(strict_types=1); namespace Magento\Framework\View\Element; use Magento\Framework\View\Element\Block\ArgumentInterface; class ButtonLockManager implements ArgumentInterface { /** * @var ButtonLockInterface[] */ private array $buttonLockPool; /** * @param array $buttonLockPool */ public function __construct(array $buttonLockPool = []) { $this->buttonLockPool = $buttonLockPool; } /** * Returns true if the button has to be disabled. * * @param string $buttonCode * @return bool * @throws \Magento\Framework\Exception\InputException */ public function isDisabled(string $buttonCode): bool { $result = array_filter($this->buttonLockPool, function ($item) use ($buttonCode) { return $item->getCode() === $buttonCode && $item->isDisabled(); }); return !empty($result); } }