/**
  * Constructor
  */
 public function __construct()
 {
     $this->bootstrap = true;
     $this->table = 'leohook';
     $this->className = 'LeotempcpPanel';
     $this->lang = true;
     $this->context = Context::getContext();
     parent::__construct();
     $this->display_key = (int) Tools::getValue('show_modules');
     $this->ownPositions = array('displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayPromoteTop', 'displayBottom', 'displayMassBottom');
     $this->hookspos = LeoFrameworkHelper::getHookPositions();
     $this->theme_name = Context::getContext()->shop->getTheme();
 }
Exemplo n.º 2
0
 /**
  * Install Hooks using for framework
  */
 private function _installHook()
 {
     $hookspos = LeoFrameworkHelper::getHookPositions();
     foreach ($hookspos as $hook) {
         if (Hook::getIdByName($hook)) {
         } else {
             $new_hook = new Hook();
             $new_hook->name = pSQL($hook);
             $new_hook->title = pSQL($hook);
             $new_hook->live_edit = 1;
             $new_hook->position = 1;
             $new_hook->add();
             $id_hook = $new_hook->id;
         }
     }
     return true;
 }