当前位置: 首页>>代码示例>>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;未经允许,请勿转载。