32 lines
718 B
PHP
32 lines
718 B
PHP
<?php
|
|
|
|
namespace Bx\Discount\Ajax;
|
|
|
|
use Bx\Discount\Agents\SpiderAgentManager;
|
|
use Wt\Core\Ajax\AAjaxHandler;
|
|
|
|
class BxDiscount extends AAjaxHandler
|
|
{
|
|
public function ajaxStart()
|
|
{
|
|
$this->getResponse()->addData(['method' => 'ajaxStart']);
|
|
}
|
|
|
|
public function spiderAgentDelete()
|
|
{
|
|
$agentManager = new SpiderAgentManager();
|
|
$agentManager->delete();
|
|
}
|
|
|
|
public function spiderAgentAdd()
|
|
{
|
|
$agentManager = new SpiderAgentManager();
|
|
$agentManager->add();
|
|
}
|
|
|
|
public function test()
|
|
{
|
|
$this->getResponse()->addData(['method' => 'test', 'version' => discountApp()->module()->getVersion()]);
|
|
return $this->getResponse();
|
|
}
|
|
} |