public function __construct() { global $cookie; $this->table = 'cms_category'; $this->className = 'CMSCategory'; $this->lang = true; $this->edit = true; $this->view = true; $this->delete = true; $this->fieldsDisplay = array('id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), 'name' => array('title' => $this->l('Name'), 'width' => 100, 'callback' => 'hideCMSCategoryPosition'), 'description' => array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'orderby' => false), 'position' => array('title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), 'active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false)); $this->_CMSCategory = AdminCMSContent::getCurrentCMSCategory(); $this->_filter = 'AND `id_parent` = ' . (int) $this->_CMSCategory->id; $this->_select = 'position '; parent::__construct(); }
public function __construct() { $this->table = 'cms'; $this->className = 'CMS'; $this->lang = true; $this->edit = true; $this->view = true; $this->delete = true; $this->fieldsDisplay = array('id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'link_rewrite' => array('title' => $this->l('URL'), 'width' => 200), 'meta_title' => array('title' => $this->l('Title'), 'width' => 300), 'position' => array('title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'position', 'align' => 'center', 'position' => 'position'), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)); $this->_category = AdminCMSContent::getCurrentCMSCategory(); $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'cms_category` c ON (c.`id_cms_category` = a.`id_cms_category`)'; $this->_select = 'a.position '; $this->_filter = 'AND c.id_cms_category = ' . (int) $this->_category->id; parent::__construct(); }