/** * Closes the window * @param string $location * @return void */ public function close($location = NULL) { $this->storage->remove(); $this->open = FALSE; if (!$this->presenter->isAjax()) { if (isset($location)) { $this->presenter->redirect($location); } else { $this->presenter->redirect('this'); } } }
/** * @param Form $form * @return void Zpracovani formulare - pridani noveho komentare */ public function formSucceeded(Form $form) { //nacteni a smazani session $values = \Nette\Utils\ArrayHash::from($this->commentSession->content); $this->commentSession->remove(); //ulozit novy prispevek ke clanku $this->article = $this->articleRepository->getById($values->articleId); if (isset($this->myUser)) { $values->user = $this->myUser; $values->name = NULL; } else { $values->user = NULL; } //vytvoreni komentu, prirazeni ke clanku a ulozeni $newComment = new \App\Model\Entities\Comment($this->article, $values->user, $values->name, $values->content); $this->articleRepository->getEntityManager()->persist($newComment); $this->article->addComment($newComment); $this->articleRepository->getEntityManager()->flush(); $this->redirect('this'); }
/** * Confirmation of paypal payment */ public function confirmExpressCheckout(SessionSection $ses) { $query = array('amount' => $ses->amount, 'payerID' => $ses->payerID, 'token' => $ses->token, 'paymentAction' => $ses->paymentType, 'currencyCode' => $ses->currencyCodeType, 'ipAdress' => urlencode($_SERVER['SERVER_NAME'])); $request = new Request($query); $request->setMethod('DoExpressCheckoutPayment'); // Same as $request->addQuery(array('method', '...')); $response = $this->call($request); if ($response->success) { $ses->remove(); } return $response; }
/** * Clear all data from the persistent storage * * @return void */ public function clearAll() { $this->session->remove(); }
/** * */ public function cartClear() { $this->shopCart->remove(); }
public function remove() { $this->sessionSection->remove(); }