public function run($params = null) { $messages = new \fpcm\modules\nkorg\inactivity_manager\model\messages(); $messageList = $messages->getMessages(true); foreach ($messageList as $message) { array_unshift($params, (string) $message); } return $params; }
public function run($params = null) { $messages = new \fpcm\modules\nkorg\inactivity_manager\model\messages(); $messageList = $messages->getMessages(true, true); if (!count($messageList)) { $params['{{inactivityManagerCommentsDiabled}}'] = ''; return $params; } $params['{{submitButton}}'] = "<button type=\"button\" disabled=\"disabled\" \">{$this->lang->translate('GLOBAL_SUBMIT')}</button>"; $params['{{inactivityManagerCommentsDiabled}}'] = $this->lang->translate('NKORGINACTIVITY_MANAGER_NOCOMMENTS_MSG'); return $params; }
public function run($params = null) { $messages = new \fpcm\modules\nkorg\inactivity_manager\model\messages(); $messageList = $messages->getMessages(true); $messageString = ''; if (!count($messageList)) { return $params; } foreach ($messageList as $message) { $messageString .= (string) $message; } $params['{{inactivityManagerMessages}}'] = $messageString; return $params; }
public function run($params = null) { $view = new \fpcm\model\view\module(\fpcm\model\abstracts\module::getModuleKeyByFolder(__DIR__), 'acp', 'main'); $messages = new \fpcm\modules\nkorg\inactivity_manager\model\messages(); if (!is_null(\fpcm\classes\http::get('added'))) { $view->addNoticeMessage('NKORGINACTIVITY_MANAGER_SAVED_OK'); } if (!is_null(\fpcm\classes\http::get('btnDeleteTerms')) && !is_null(\fpcm\classes\http::get('ids'))) { $ids = \fpcm\classes\http::get('ids'); if ($messages->deleteMessage($ids)) { $view->addNoticeMessage('NKORGINACTIVITY_MANAGER_DELETE_OK'); } else { $view->addErrorMessage('NKORGINACTIVITY_MANAGER_DELETE_FAILED'); } } $view->assign('messages', $messages->getMessages()); $view->render(); }