public function __construct()
 {
     /* Get current category */
     $id_cms_category = (int) Tools::getValue('id_cms_category', Tools::getValue('id_cms_category_parent', 1));
     self::$_category = new CMSCategory($id_cms_category);
     if (!Validate::isLoadedObject(self::$_category)) {
         die('Category cannot be loaded');
     }
     $this->table = array('cms_category', 'cms');
     $this->adminCMSCategories = new adminCMSCategories();
     $this->adminCMS = new adminCMS();
     parent::__construct();
 }
예제 #2
0
 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();
 }
예제 #3
0
    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();
    }