當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Form::getPresenter方法代碼示例

本文整理匯總了PHP中Nette\Application\UI\Form::getPresenter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Form::getPresenter方法的具體用法?PHP Form::getPresenter怎麽用?PHP Form::getPresenter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Nette\Application\UI\Form的用法示例。


在下文中一共展示了Form::getPresenter方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: changeCategoryRankFormSucceeded

 public function changeCategoryRankFormSucceeded(Form $form)
 {
     $values = (object) $form->getHttpData();
     $this->categoryFacade->changeRanks($values->categoryRank);
     $form->getPresenter()->flashMessage("Pořadí kategorií bylo úspěšně změněno.", "alert-success");
     $form->getPresenter()->redirect("this");
 }
開發者ID:jaromir92,項目名稱:Sportwin,代碼行數:7,代碼來源:ChangeCategoryRankForm.php

示例2: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     $zaznam = $this->database->table('druhZivocicha')->get($this->Id);
     $zaznam->update($hodnoty);
     $form->getPresenter()->flashMessage('Úspešne editované!', 'uspech');
     $form->getPresenter()->redirect('Druh:viac', $this->Id);
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:7,代碼來源:EditovatDruhForm.php

示例3: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     foreach ($hodnoty['umiestnenie'] as &$hodnota) {
         if ($hodnota === '') {
             $hodnota = NULL;
         }
     }
     $zaznam = $this->database->table('umiestnenie')->insert($hodnoty['umiestnenie']);
     if ($this->mod == 0) {
         foreach ($hodnoty['klietka'] as &$hodnota) {
             if ($hodnota === '') {
                 $hodnota = NULL;
             }
         }
         $hodnoty['klietka']->IDUmiestnenia = $zaznam->IDUmiestnenia;
         $this->database->table('klietka')->insert($hodnoty['klietka']);
     } else {
         foreach ($hodnoty['vybeh'] as &$hodnota) {
             if ($hodnota === '') {
                 $hodnota = NULL;
             }
         }
         $hodnoty['vybeh']->IDUmiestnenia = $zaznam->IDUmiestnenia;
         $this->database->table('vybeh')->insert($hodnoty['vybeh']);
     }
     $form->getPresenter()->flashMessage('Úspešne pridané!', 'uspech');
     $form->getPresenter()->redirect('Umiestnenie:vypis');
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:28,代碼來源:VytvoritUmiestnenieForm.php

示例4: formSucceeded

 /**
  * Zpracovani formulare s anketou
  * @param Form $form
  * @param Nette\Utils\ArrayHash $values
  */
 public function formSucceeded(Form $form, $values)
 {
     $result = TRUE;
     if ($result) {
         $form->getPresenter()->flashMessage($form->getTranslator()->translate('system.requestS'), 'success');
     } else {
         $form->getPresenter()->flashMessage($form->getTranslator()->translate('system.requestN'), 'danger');
     }
 }
開發者ID:krupaj,項目名稱:my-blog,代碼行數:14,代碼來源:ArticleVoteFormFactory.php

示例5: formSucceeded

 /**
  * Zpracovani formulare s rubrikou
  * @param Form $form
  * @param Nette\Utils\ArrayHash $values
  */
 public function formSucceeded(Form $form, $values)
 {
     //nova rubrika nebo jeji editace
     $result = empty($values->id) ? $this->newTag($values) : $this->editTag($values);
     if ($result) {
         $form->getPresenter()->flashMessage($form->getTranslator()->translate('system.requestS'));
     } else {
         $form->getPresenter()->flashMessage($form->getTranslator()->translate('system.requestN'));
     }
 }
開發者ID:krupaj,項目名稱:my-blog,代碼行數:15,代碼來源:TagFormFactory.php

示例6: changeSystemSettingsFormSucceeded

 public function changeSystemSettingsFormSucceeded(Form $form, $values)
 {
     $systemSettings = new SystemSettingsCollection();
     foreach ($values as $name => $value) {
         $systemSettings->addItem(SystemSettingsService::loadForUpdate($name, $value));
     }
     $this->systemSettingsFacade->save($systemSettings);
     $form->getPresenter()->flashMessage("Systémové údaje byly úspěšně uloženy.", "alert-success");
     $form->getPresenter()->redirect("this");
 }
開發者ID:jaromir92,項目名稱:Sportwin,代碼行數:10,代碼來源:ChangeSystemSettingsForm.php

示例7: solutionFormSucceeded

 /**
  * @param Form $form
  * @param $values
  */
 function solutionFormSucceeded(Form $form, $values)
 {
     if ($values->file->isOk()) {
         $values->projects_id = $this->projectManager->accepted($this->user->id)->id;
         $values->file = FileUploadHandler::upload($values->file);
         $this->database->table('solutions')->insert($values);
         $form->getPresenter()->flashMessage('Solution has been successfully uploaded.', 'success');
     } else {
         $form->getPresenter()->flashMessage('Something went wrong while uploading a file :( .', 'danger');
     }
 }
開發者ID:vitush93,項目名稱:dba,代碼行數:15,代碼來源:SolutionFormFactory.php

示例8: monthFilterFormSucceeded

 public function monthFilterFormSucceeded(Form $form, $values)
 {
     $form->getPresenter()->month = $values->month;
     $form->getPresenter()->year = $values->year;
     if ($values->offsetExists("user") && $values->user > 0) {
         $form->getPresenter()->userId = $values->user;
     } else {
         $form->getPresenter()->userId = null;
     }
     $form->getPresenter()->redirect("this");
 }
開發者ID:jaromir92,項目名稱:Sportwin,代碼行數:11,代碼來源:ArticlesFilterForm.php

示例9: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     $uzivatel = $form->getPresenter()->getUser();
     try {
         $uzivatel->login($hodnoty->RodneCislo, $hodnoty->heslo);
         $uzivatel->setExpiration('1 hour', FALSE);
         $form->getPresenter()->redirect('Umiestnenie:vypis');
     } catch (Nette\Security\AuthenticationException $chyba) {
         $form->getPresenter()->redirect('Homepage:prihlasenieNeuspech');
     }
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:11,代碼來源:PrihlasenieForm.php

示例10: formSucceeded

 public function formSucceeded(Form $form, $values)
 {
     try {
         $userManager = new Model\UserManager($this->user, $this->database);
         $userManager->register($values->username, $values->password, $values->repassword);
     } catch (Nette\Security\AuthenticationException $e) {
         $form->addError($e->getMessage());
     }
     if ($form->getPresenter()->isAjax()) {
         $form->getPresenter()->redrawControl('register');
     }
 }
開發者ID:jandoubek,項目名稱:fjfi-pvs-inzeraty,代碼行數:12,代碼來源:RegisterFormFactory.php

示例11: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     foreach ($hodnoty as &$hodnota) {
         if ($hodnota === '') {
             $hodnota = NULL;
         }
     }
     //kvoli db chcem tam mat null a nie prazdny string
     $this->database->table('zivocich')->insert($hodnoty);
     $form->getPresenter()->flashMessage('Úspešne pridané!', 'uspech');
     $form->getPresenter()->redirect('Zivocich:vypis');
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:12,代碼來源:VytvoritZivocichaForm.php

示例12: passwordChangeFormSucceeded

 public function passwordChangeFormSucceeded(Form $form, $values)
 {
     $user = $this->userFacade->findOneById($this->user->getId());
     if (!Passwords::verify($values->actualPassword, $user->hash)) {
         $form->addError("Zadal si špatné aktuální heslo. Zkus to znovu!");
     } else {
         $user->changePassword($values->password);
         $this->userFacade->save($user);
         $form->getPresenter()->flashMessage("Tvoje heslo bylo úspěšně změněno", "alert-success");
         $form->getPresenter()->redirect("this");
     }
 }
開發者ID:jaromir92,項目名稱:Sportwin,代碼行數:12,代碼來源:PasswordChangeForm.php

示例13: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     foreach ($hodnoty as &$hodnota) {
         if ($hodnota === '') {
             $hodnota = NULL;
         }
     }
     //kvoli db lebo tam chcem null a nie prazdnyretazec
     $zaznam = $this->database->table('zivocich')->get($this->Id);
     $zaznam->update($hodnoty);
     $form->getPresenter()->flashMessage('Úspešne editované!', 'uspech');
     $form->getPresenter()->redirect('Zivocich:viac', $this->Id);
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:13,代碼來源:EditovatZivocichaForm.php

示例14: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     foreach ($hodnoty as &$hodnota) {
         if ($hodnota === '') {
             $hodnota = NULL;
         }
     }
     //menim prazdne stringy na nully kvoli db
     $hodnoty['heslo'] = md5($hodnoty['heslo']);
     $this->database->table('zamestnanec')->insert($hodnoty);
     $form->getPresenter()->flashMessage('Úspešne pridané!', 'uspech');
     $form->getPresenter()->redirect('Zamestnanec:vypis');
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:13,代碼來源:VytvoritZamestnancaForm.php

示例15: uspesne

 public function uspesne(Form $form, $hodnoty)
 {
     foreach ($hodnoty as &$hodnota) {
         if ($hodnota === '') {
             $hodnota = NULL;
         }
     }
     // zmenim prazdne stringy na nully, kvoli db
     $zaznam = $this->database->table('zamestnanec')->get($this->RodneCislo);
     $zaznam->update($hodnoty);
     $form->getPresenter()->flashMessage('Úspešne editované!', 'uspech');
     $form->getPresenter()->redirect('Zamestnanec:viac', $this->RodneCislo);
 }
開發者ID:Raiper34,項目名稱:IIS-ZOO,代碼行數:13,代碼來源:EditovatZamestnancaForm.php


注:本文中的Nette\Application\UI\Form::getPresenter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。