61 lines
1.3 KiB
PHP
61 lines
1.3 KiB
PHP
<?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('');
|
|
|
|
$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($st->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;
|
|
}
|
|
|
|
public function hookLeftColumn($params)
|
|
{
|
|
global $smarty;
|
|
return $this->display(__FILE__, 'braderie.tpl');
|
|
}
|
|
|
|
public function hookRightColumn($params)
|
|
{
|
|
return $this->hookLeftColumn($params);
|
|
}
|
|
|
|
}
|