controllers/Taxes.php
<?php namespace Lovata\Shopaholic\Controllers;
use Event;
use BackendMenu;
use System\Classes\SettingsManager;
use Backend\Classes\Controller;
/**
* Class Taxes
* @package Lovata\Shopaholic\Controllers
* @author Andrey Kharanenka, a.khoronenko@lovata.com, LOVATA Group
*/
class Taxes extends Controller
{
public $implement = [
'Backend.Behaviors.ListController',
'Backend.Behaviors.FormController',
'Backend.Behaviors.ReorderController',
'Backend.Behaviors.RelationController',
];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public $relationConfig = 'config_relation.yaml';
public $reorderConfig = 'config_reorder.yaml';
/**
* PriceTypes constructor.
*/
public function __construct()
{
parent::__construct();
BackendMenu::setContext('October.System', 'system', 'settings');
SettingsManager::setContext('Lovata.Shopaholic', 'shopaholic-menu-tax');
}
/**
* Ajax handler onReorder event
*
* @return mixed
*/
public function onReorder()
{
$obResult = parent::onReorder();
Event::fire('shopaholic.tax.update.sorting');
return $obResult;
}
}