* @copyright 2012-2017 Patryk Marek - PrestaDev.pl
* @license License is for use in domain / or one multistore enviroment (do not modify or reuse this code or part of it) if you want any changes please contact with me at info@prestadev.pl
* @link http://prestadev.pl
* @package PD Price Compare Pro - PrestaShop 1.5.x and 1.6.x Module
* @version 1.5.0
* @date 10-06-2015
*/
require_once dirname(__FILE__).'/../../models/GoogleMerchantCenterProModelDictionary.php';
class AdminGoogleMerchantCenterProDictionaryController extends AdminController
{
public $module = null;
public $module_name = 'pdgooglemerchantcenterpro';
public function __construct()
{
$this->table = 'pdgooglemerchantcenterpro_dictionary';
$this->className = 'GoogleMerchantCenterProModelDictionary';
$this->lang = false;
$this->bootstrap = true;
if (Module::isInstalled($this->module_name)) {
$this->module = Module::getInstanceByName($this->module_name);
}
$this->addRowAction('edit');
$this->addRowAction('delete');
$this->allow_export = true;
$this->id_lang = Configuration::get('PS_LANG_DEFAULT');
$this->ps_ver_16 = (version_compare(Tools::substr(_PS_VERSION_, 0, 3), '1.6', '=')) ? true : false;
$this->ps_ver_15 = (version_compare(Tools::substr(_PS_VERSION_, 0, 3), '1.5', '=')) ? true : false;
$this->context = Context::getContext();
$this->default_form_language = $this->context->language->id;
parent::__construct();
$this->bulk_actions = array(
'delete' => array(
'text' => $this->l('Delete selected'),
'confirm' => $this->l('Delete selected items?')
),
'enableSelection' => array('text' => $this->l('Enable selection')),
'disableSelection' => array('text' => $this->l('Disable selection'))
);
$this->bulk_actions = array(
'delete' => array(
'text' => $this->l('Delete selected'),
'confirm' => $this->l('Delete selected items?')
)
);
$this->fields_list = array(
'id_pdgooglemerchantcenterpro_dictionary' => array(
'title' => $this->l('ID'),
'align' => 'center',
'filter' => false,
'width' => 25
),
'active' => array(
'title' => $this->l('Active'),
'align' => 'center',
'active' => 'status',
'type' => 'bool',
'filter' => false,
'orderby' => false,
'width' => 25
),
'source_word' => array(
'title' => $this->l('Source word / phrase'),
'width' => 100
),
'destination_word' => array(
'title' => $this->l('Destination word / phrase'),
'width' => 100
),
'date_add' => array(
'title' => $this->l('Date add'),
'align' => 'right',
'width' => 'auto',
'filter' => false,
'type' => 'datetime',
),
'date_upd' => array(
'title' => $this->l('Date updated'),
'align' => 'right',
'width' => 'auto',
'filter' => false,
'type' => 'datetime'
),
);
}
/**
* Function used to render the list to display for this controller
*/
public function renderList()
{
$this->displayInformation(' '.$this->l('How do I use dictionary and what it is for?').'