Advertisement
Guest User

Untitled

a guest
May 25th, 2017
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.70 KB | None | 0 0
  1. <?php
  2. if (!defined('_PS_VERSION_'))
  3.   exit;
  4.  
  5. class VerticalSideMenu extends Module{
  6.  
  7.  public function __construct(){
  8.     $this->name = 'verticalsidemenu';
  9.     $this->tab = 'front_office_features';
  10.     $this->version = '1.0.0';
  11.     $this->author = 'Mattia Bonacini';
  12.     $this->need_instance = 0;
  13.     $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
  14.     $this->bootstrap = true;
  15.  
  16.     parent::__construct();
  17.  
  18.     $this->displayName = $this->l('Vertical Side Menu');
  19.     $this->description = $this->l('Aggiunge un menu laterale');
  20.  
  21.     $this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
  22.     if (!Configuration::get('VERTICAL_SIDE_MENU'))
  23.       $this->warning = $this->l('Nessun NOME fornito');
  24.  
  25.   }
  26. public function install(){
  27.   if (Shop::isFeatureActive())
  28.     Shop::setContext(Shop::CONTEXT_ALL);
  29.  
  30.   if (!parent::install() ||
  31.     !$this->registerHook('displayHome') ||
  32.     !$this->registerHook('displayCreativeHeader') ||
  33.     !Configuration::updateValue('VERTICAL_SIDE_MENU', 'myvsm') ||
  34.     $this->context->controller->addCSS($this->_path.'/modules/verticalsidemenu/css/style.css')
  35.  
  36.   )
  37.     return false;
  38.  
  39.   return true;
  40. }
  41. public function uninstall()
  42. {
  43.   if (!parent::uninstall() ||
  44.     !Configuration::deleteByName('VERTICAL_SIDE_MENU')
  45.   )
  46.     return false;
  47.  
  48.   return true;
  49. }
  50. public function hookDisplayHome(){
  51.  
  52.  
  53.  
  54.  
  55.   return $this->display(__FILE__, 'verticalsidemenu.tpl');
  56.  
  57. }
  58. public function hookDisplayTop(){
  59.  
  60.  
  61.  
  62.   return $this->display(__FILE__, 'verticalsidemenu.tpl');
  63.  
  64. }
  65. public function hookDisplayCreativeHeader(){
  66.  
  67.  
  68.  
  69.  
  70.   return $this->display(__FILE__, 'verticalsidemenu.tpl');
  71.  
  72. }
  73.  
  74.  
  75. //missing styles
  76.  
  77.  
  78.  
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement