name = 'ant_multi_cartrule'; $this->tab = 'others'; $this->version = 0.1; $this->author = 'Antadis'; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); parent::__construct(); $this->displayName = $this->l('Antadis creation de bons en masse'); } public function install() { return ( parent::install() ); } public function uninstall() { return ( parent::uninstall() ); } public static function createTab($id_parent, $module, $name, $class_name, $status=True) { $tab = new Tab(); $tab->module = $module; foreach (Language::getLanguages(True) as $languages) { $tab->name[$languages['id_lang']] = $name; } if (!is_numeric($id_parent)) { $id_parent = Tab::getIdFromClassName($id_parent); } $tab->id_parent = $id_parent; $tab->class_name = $class_name; $tab->active = $status; $r = $tab->save(); if ($r === False) return False; return $tab->id; } public function deleteTab($class_name) { if ($id_tab = Tab::getIdFromClassName($class_name)) { $tab = new Tab((int)$id_tab); $tab->delete(); } return True; } }