Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined('_PS_VERSION_'))
- exit;
- class VerticalSideMenu extends Module{
- public function __construct(){
- $this->name = 'verticalsidemenu';
- $this->tab = 'front_office_features';
- $this->version = '1.0.0';
- $this->author = 'Mattia Bonacini';
- $this->need_instance = 0;
- $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
- $this->bootstrap = true;
- parent::__construct();
- $this->displayName = $this->l('Vertical Side Menu');
- $this->description = $this->l('Aggiunge un menu laterale');
- $this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
- if (!Configuration::get('VERTICAL_SIDE_MENU'))
- $this->warning = $this->l('Nessun NOME fornito');
- }
- public function install(){
- if (Shop::isFeatureActive())
- Shop::setContext(Shop::CONTEXT_ALL);
- if (!parent::install() ||
- !$this->registerHook('displayHome') ||
- !$this->registerHook('displayCreativeHeader') ||
- !Configuration::updateValue('VERTICAL_SIDE_MENU', 'myvsm') ||
- $this->context->controller->addCSS($this->_path.'/modules/verticalsidemenu/css/style.css')
- )
- return false;
- return true;
- }
- public function uninstall()
- {
- if (!parent::uninstall() ||
- !Configuration::deleteByName('VERTICAL_SIDE_MENU')
- )
- return false;
- return true;
- }
- public function hookDisplayHome(){
- return $this->display(__FILE__, 'verticalsidemenu.tpl');
- }
- public function hookDisplayTop(){
- return $this->display(__FILE__, 'verticalsidemenu.tpl');
- }
- public function hookDisplayCreativeHeader(){
- return $this->display(__FILE__, 'verticalsidemenu.tpl');
- }
- //missing styles
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement