/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/Result/LayoutFactory.php
49 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ namespace Magento\Framework\View\Result; use Magento\Framework\ObjectManagerInterface; /** * @api * @since 100.0.2 */ class LayoutFactory { /** * @var ObjectManagerInterface */ private $objectManager; /** * @var string */ protected $instanceName; /** * @param ObjectManagerInterface $objectManager * @param string $instanceName */ public function __construct( ObjectManagerInterface $objectManager, $instanceName = \Magento\Framework\View\Result\Layout::class ) { $this->objectManager = $objectManager; $this->instanceName = $instanceName; } /** * @return \Magento\Framework\View\Result\Layout */ public function create() { /** @var \Magento\Framework\View\Result\Layout $resultLayout */ $resultLayout = $this->objectManager->create($this->instanceName); $resultLayout->addDefaultHandle(); return $resultLayout; } }