bebeboutik/modules/braderie/braderie.php

50 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2016-03-16 11:49:15 +01:00
<?php
class Braderie extends Module
{
public function __construct()
{
$this->name = 'braderie';
$this->tab = 'administration';
$this->version = '1.0';
parent::__construct();
$this->displayName = $this->l('Braderie');
$this->description = $this->l('Gestion de la braderie');
$this->_html = '';
}
public function install()
{
$tabs_i18n = array(
'fr' => 'Braderie',
'en' => 'Sellout',
);
$t = new Tab();
$t->id_parent = (int) Tab::getIdFromClassName('AdminCatalog');
$st->position = (int) Tab::getNewLastPosition($t->id_parent);
$t->active = TRUE;
$t->module = 'braderie';
$t->class_name = 'AdminBraderie';
foreach(Language::getLanguages() as $lang) {
if(isset($tabs_i18n[$lang['iso_code']])) {
$t->name[$lang['id_lang']] = $tabs_i18n[$lang['iso_code']];
} else {
$t->name[$lang['id_lang']] = $tabs_i18n['en'];
}
}
$t->save();
return parent::install();
}
public function uninstall()
{
if (parent::uninstall() == false)
return false;
return true;
}
}