public function __construct()
 {
     MondialRelay::initModuleAccess();
     $this->table = 'mr_selected';
     $this->className = 'MondialRelayClass';
     parent::__construct();
 }
Esempio n. 2
0
if (in_array($method, $back_office_method)) {
    define('_PS_ADMIN_DIR_', true);
}
require_once realpath(dirname(__FILE__) . '/../../config/config.inc.php');
if (_PS_VERSION_ < '1.5' || !defined('_PS_ADMIN_DIR_')) {
    require_once realpath(dirname(__FILE__) . '/../../init.php');
}
/** Backward compatibility */
require dirname(__FILE__) . '/backward_compatibility/backward.php';
require dirname(__FILE__) . '/mondialrelay.php';
require dirname(__FILE__) . '/classes/MRCreateTickets.php';
require dirname(__FILE__) . '/classes/MRGetTickets.php';
require dirname(__FILE__) . '/classes/MRGetRelayPoint.php';
require dirname(__FILE__) . '/classes/MRRelayDetail.php';
require dirname(__FILE__) . '/classes/MRManagement.php';
MondialRelay::initModuleAccess();
// Access page List liable to the generated token
$accessPageList = array(MondialRelay::getToken('front') => $front_office_method, MondialRelay::getToken('back') => $back_office_method);
$params = array();
$result = array();
// If the method name associated to the token received doesn't match with
// the list, then we kill the request
if (!isset($accessPageList[$token]) || !in_array($method, $accessPageList[$token])) {
    exit;
}
// Method name allow to instanciate his object to properly call the
// implemented interface method and do his job
switch ($method) {
    case 'MRCreateTickets':
        $params['orderIdList'] = Tools::getValue('order_id_list');
        $params['totalOrder'] = Tools::getValue('numSelected');