80 lines
1.6 KiB
PHP
80 lines
1.6 KiB
PHP
<?php
|
|
|
|
if (!defined('_PS_VERSION_')){
|
|
exit;
|
|
}
|
|
|
|
class Cyb_AvisVerifies extends Module {
|
|
|
|
|
|
public function __construct(){
|
|
$this->name = 'cyb_avisverifies';
|
|
$this->tab = 'cyb_avisverifies';
|
|
$this->version = '1';
|
|
$this->author = 'Cyberscope Bastien';
|
|
$this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
|
|
$this->bootstrap = true;
|
|
$this->display = 'view';
|
|
|
|
parent::__construct();
|
|
|
|
$this->displayName = $this->l('Cyberscope Avis Vérifiés');
|
|
$this->description = $this->l('');
|
|
$this->confirmUninstall = $this->l('Êtes-vous sûr de vouloir désinstaller ce module ?');
|
|
|
|
$this->templateFile = 'module:cyb_avisverifies/cyb_avisverifies.tpl';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function install(){
|
|
if(!parent::install() || !$this->registerHook('displayHome') || !$this->registerHook('header')){
|
|
return false;
|
|
}
|
|
else{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function uninstall(){
|
|
if(!parent::uninstall()){
|
|
return false;
|
|
}
|
|
else{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function hookHeader(){
|
|
$this->context->controller->registerStylesheet('css-cyb-avisverifies', 'modules/' . $this->name. '/css/style.css',
|
|
[
|
|
'media' => 'all',
|
|
'priority' => 0,
|
|
]
|
|
);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function hookDisplayHome(){
|
|
return $this->display(__FILE__,'cyb_avisverifies.tpl');
|
|
}
|
|
|
|
|
|
|
|
|
|
} |