This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace Esun\Review\Plugin\Adminhtml\Review;
use Esun\Review\Block\Adminhtml\Review\Images;
use Magento\Review\Block\Adminhtml\Edit\Form;
class FormImagesPlugin
{
public function afterToHtml(Form $subject, string $html): string
{
$reviewId = (int)$subject->getRequest()->getParam('id');
if ($reviewId <= 0) {
return $html;
}
$imagesHtml = $subject->getLayout()
->createBlock(Images::class)
->setTemplate('Esun_Review::review/images.phtml')
->setData('review_id', $reviewId)
->toHtml();
return $imagesHtml ? $html . $imagesHtml : $html;
}
}