init
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user