Example #1
0
 public function __construct()
 {
     $this->table = 'blog_post';
     $this->className = 'BlogPost';
     $this->edit = true;
     $this->view = false;
     $this->delete = true;
     if (isset($_GET['id_' . $this->table]) || isset($_GET['add' . $this->table])) {
         $this->multishop_context = Shop::CONTEXT_ALL;
     }
     $this->module = 'psblog';
     $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items ?')));
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     $this->_select .= ' l.iso_code ';
     $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'lang l on l.id_lang = a.id_lang ';
     $this->_orderBy = 'id_blog_post';
     $this->_orderWay = 'DESC';
     $this->fields_list = array('id_blog_post' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), 'status' => array('title' => $this->l('Status'), 'align' => 'center', 'icon' => array('published' => 'enabled.gif', 'drafted' => 'warning.gif', 'suspended' => 'forbbiden.gif', 'default' => 'unknown.gif'), 'orderby' => false, 'search' => false, 'width' => 60));
     if (count(Language::getLanguages(true)) > 1) {
         $this->fields_list['iso_code'] = array('title' => $this->l('Lang'), 'width' => 20);
     }
     $this->fields_list['title'] = array('title' => $this->l('Title'), 'width' => 400);
     $this->fields_list['date_on'] = array('title' => $this->l('Publication date'), 'width' => 120, 'type' => 'date', 'search' => false);
     $this->conf = Psblog::getPreferences();
     BlogShop::addBlogAssoTables();
     parent::__construct();
 }
 public function __construct()
 {
     $this->table = 'blog_category';
     $this->className = 'BlogCategory';
     $this->module = 'psblog';
     $this->multishop_context = Shop::CONTEXT_ALL;
     $this->edit = true;
     $this->delete = true;
     $this->view = false;
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     $this->_select = ' l.`iso_code` ';
     $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'lang l on l.id_lang = a.id_lang ';
     $this->fields_list = array('id_blog_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), 'active' => array('title' => $this->l('Active'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false, 'width' => 60));
     if (count(Language::getLanguages(true)) > 1) {
         $this->fields_list['iso_code'] = array('title' => $this->l('Language'), 'width' => 20);
     }
     $this->fields_list['position'] = array('title' => $this->l('Position'), 'width' => 60);
     $this->fields_list['name'] = array('title' => $this->l('Category name'), 'width' => 400);
     BlogShop::addBlogAssoTables();
     parent::__construct();
 }
Example #3
0
 public function __construct($id = null, $id_lang = null, $id_shop = null)
 {
     BlogShop::addBlogAssoTables();
     parent::__construct($id, $id_lang, $id_shop);
 }