mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
43 lines
914 B
PHP
43 lines
914 B
PHP
<?php
|
|
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Magento\Widget\Model\ResourceModel\Layout;
|
|
|
|
class Plugin
|
|
{
|
|
/**
|
|
* @var Update
|
|
*/
|
|
private $update;
|
|
|
|
/**
|
|
* @param Update $update
|
|
*/
|
|
public function __construct(Update $update)
|
|
{
|
|
$this->update = $update;
|
|
}
|
|
|
|
/**
|
|
* Around update
|
|
*
|
|
* @param \Magento\Framework\View\Model\Layout\Merge $subject
|
|
* @param callable $proceed
|
|
* @param string $handle
|
|
* @return string
|
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
|
*/
|
|
public function aroundGetDbUpdateString(
|
|
\Magento\Framework\View\Model\Layout\Merge $subject,
|
|
\Closure $proceed,
|
|
$handle
|
|
) {
|
|
return $this->update->fetchUpdatesByHandle($handle, $subject->getTheme(), $subject->getScope());
|
|
}
|
|
}
|