/** * Initialise the object variables * * @param Prediggo $oModule Object Prediggo */ public function __construct($oModule = false) { $this->oPrediggoExportConfig = PrediggoExportConfig::singleton(); $this->sRepositoryPath = _PS_MODULE_DIR_ . 'prediggo/xmlfiles/'; // Set the module of the controller to get Content translations && set its errors / confirmations if ($oModule) { $this->module = $oModule; } else { require_once _PS_MODULE_DIR_ . 'prediggo/prediggo.php'; $this->module = new Prediggo(); } $this->_logs = array(); $this->_errors = array(); $this->_confirmations = array(); }
/** * Initialise the object variables */ public function __construct() { $this->name = 'prediggo'; $this->tab = 'front_office_features'; $this->version = '1.8'; $this->author = 'Croissance Net'; $this->need_instance = 1; parent::__construct(); $this->displayName = $this->l('Prediggo'); $this->description = $this->l('Offers interactive products recommendations in the front office'); /* Set the Configuration Object */ $this->oPrediggoConfig = PrediggoConfig::singleton(); $this->oPrediggoExportConfig = PrediggoExportConfig::singleton(); $this->oPrediggoRecommendationConfig = PrediggoRecommendationConfig::singleton(); $this->oPrediggoSearchConfig = PrediggoSearchConfig::singleton(); /* Set the main controllers */ $this->oDataExtractorController = new DataExtractorController($this); $this->oPrediggoCallController = new PrediggoCallController(); $this->aRecommendations = array(); // Check configuration of the server $this->checkServerConfiguration(); }