コード例 #1
0
ファイル: public.php プロジェクト: biggtfish/magixcms
 /**
  * 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);
 }
コード例 #2
0
ファイル: public.php プロジェクト: magix-cms/faq
 /**
  * Execute le plugin dans la partie public
  */
 public function run()
 {
     $this->template->configLoad();
     $this->template->assign('faq', $this->getQAs());
     $this->template->display('index.tpl');
 }