/** * hata mesajını siteye echo eder * * @return mixed */ public static function getMessage() { $errorArr = (array) Request::_session('errorMessageArr', false); $pageKey = Request::_get('page'); $SMARTY =& Loader::loadClass('Smarty'); if (array_key_exists($pageKey, $errorArr) && is_array($errorArr[$pageKey])) { $errorMessageArr = $errorArr[$pageKey]; $count = count($errorMessageArr); $type_0 = false; for ($i = 0; $i < $count; $i++) { if ($errorMessageArr[$i]['pageMessageTypeId'] != 0 || $errorMessageArr[$i]['pageMessageTypeId'] != 'errorContainer' || $type_0 === false) { self::addErrorMessage($SMARTY, $errorMessageArr, $i); } if ($errorMessageArr[$i]['pageMessageTypeId'] == 0 && $type_0 === false) { $type_0 = true; } } Session::deleteSessionKey('errorMessageArr', $pageKey); $SMARTY->assign('pageError', true); Session::createSession(['pageError' => true]); } else { $SMARTY->assign('pageError', false); Session::createSession(['pageError' => false]); } # global mesajları sayfada yazdırmak için $count = count($errorArr); for ($i = 0; $i < $count; $i++) { self::addErrorMessage($SMARTY, $errorArr, $i); Session::deleteSessionKey('errorMessageArr', $i); if ($i == 0) { $SMARTY->assign('pageError', true); Session::createSession(['pageError' => true]); } } }
/** * formData session'ından key siler * * @param string $childKey * @return bool */ public static function removeKey($childKey) { return Session::deleteSessionKey(self::FORMDATANAME, $childKey); }