/** * Retourne le message de notification * @param $type * @param null $subContent * @return string */ private function setNotify($type, $subContent = null) { $this->template->configLoad(); switch ($type) { case 'warning': $warning = array('empty' => $this->template->getConfigVars('fields_empty'), 'mail' => $this->template->getConfigVars('mail_format')); $message = $warning[$subContent]; break; case 'success': $message = $this->template->getConfigVars('message_send_success'); break; case 'error': $error = array('installed' => $this->template->getConfigVars('installed'), 'configured' => $this->template->getConfigVars('configured')); $message = sprintf('plugin_error', 'contact', $error[$subContent]); break; } return array('type' => $type, 'content' => $message); }
/** * Execute le plugin dans la partie public */ public function run() { $this->template->configLoad(); $this->template->assign('faq', $this->getQAs()); $this->template->display('index.tpl'); }