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,28 @@
<?php
declare(strict_types=1);
namespace Esun\CustomerCoupon\Block\Adminhtml\Form;
use Magento\Backend\Block\Template;
use Magento\Framework\Registry;
use Magento\SalesRule\Model\RegistryConstants;
class CustomerSelect extends Template
{
public function __construct(
Template\Context $context,
private readonly Registry $registry,
array $data = []
) {
parent::__construct($context, $data);
}
public function getSearchUrl(): string
{
$rule = $this->registry->registry(RegistryConstants::CURRENT_SALES_RULE);
return $this->getUrl('esun_customer_coupon/customer/search', [
'rule_id' => $rule ? (int)$rule->getId() : 0,
]);
}
}