当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::getValues方法代码示例

本文整理汇总了PHP中Venne\Forms\Form::getValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::getValues方法的具体用法?PHP Form::getValues怎么用?PHP Form::getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Venne\Forms\Form的用法示例。


在下文中一共展示了Form::getValues方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handleSave

 public function handleSave(Form $form)
 {
     $values = $form->getValues();
     if ($values['api']['keyFile']->isOk()) {
         $values['api']['keyFile']->move($this->googleanalyticsDir . '/key.p12');
     }
     unset($form['api']['keyFile']);
     unset($form['api']['keyFileNew']);
 }
开发者ID:svobodni,项目名称:web,代码行数:9,代码来源:AccountFormFactory.php

示例2: handleSave

 public function handleSave(Form $form)
 {
     /** @var $entity CategoryEntity */
     $entity = $form->data;
     $data = $form->getValues();
     $sort = json_decode($data['sort'], TRUE);
     foreach ($entity->getItems() as $photo) {
         if (($pos = array_search($photo->id, $sort)) !== false) {
             $photo->position = $pos;
         }
     }
     parent::handleSave($form);
 }
开发者ID:svobodni,项目名称:web,代码行数:13,代码来源:SortFormFactory.php

示例3: handleSave

 public function handleSave(Form $form)
 {
     /** @var $entity CategoryEntity */
     $entity = $form->data;
     $data = $form->getValues();
     foreach ($data['_photos'] as $fileEntity) {
         if ($fileEntity) {
             $entity->items[] = $photoEntity = new ItemEntity($form->data->extendedPage);
             $photoEntity->route->setPhoto($fileEntity);
             $photoEntity->route->setParent($entity->route);
             $photoEntity->setCategory($entity);
         }
     }
     parent::handleSave($form);
 }
开发者ID:svobodni,项目名称:web,代码行数:15,代码来源:UploadFormFactory.php

示例4: processForm

 public function processForm(Form $form)
 {
     $this->tryCall('handleClear', array());
     $values = $form->getValues();
     if ($values['section'] === 'all') {
         $this->cacheManager->clean();
     } elseif ($values['section'] === 'namespace') {
         try {
             $this->cacheManager->cleanNamespace($values['namespace']);
         } catch (InvalidArgumentException $e) {
             $this->flashMessage($e->getMessage(), 'warning');
             return;
         }
     } elseif ($values['section'] === 'sessions') {
         $this->cacheManager->cleanSessions();
     }
     $this->flashMessage($this->translator->translate('Cache has been cleared.'), 'success');
     if (!$this->isAjax()) {
         $this->redirect('this');
     }
 }
开发者ID:svobodni,项目名称:web,代码行数:21,代码来源:CachePresenter.php

示例5: formSuccess

 public function formSuccess(Form $form)
 {
     $values = $form->getValues();
     $button = $form->isSubmitted();
     if ($values->remember) {
         $form->presenter->user->setExpiration('+ 14 days', FALSE);
     } else {
         $form->presenter->user->setExpiration('+ 20 minutes', TRUE);
     }
     if ($button === $form->getSaveButton()) {
         try {
             $form->presenter->user->login($values->username, $values->password);
         } catch (AuthenticationException $e) {
             $this->onError($this, $e->getMessage());
         }
     } else {
         $this->redirect('login!', str_replace('_', ' ', $button->name));
     }
     $this->onSuccess($this);
     $this->redirect('this');
 }
开发者ID:svobodni,项目名称:web,代码行数:21,代码来源:LoginControl.php

示例6: handleSuccess

 public function handleSuccess(Form $form)
 {
     $values = $form->getValues();
     $oldPath = $this->moduleHelpers->expandPath($form->data, 'Resources/layouts');
     $form->data = $this->getKeyByValues($values);
     $path = $this->moduleHelpers->expandPath($form->data, 'Resources/layouts');
     umask(00);
     if (!file_exists(dirname($path))) {
         if (!@mkdir(dirname($path), 0777, TRUE)) {
             $form->addError("File '{$path}' is not writable.");
         }
     }
     file_put_contents($path, $values['text']);
     if ($oldPath && $oldPath !== $path) {
         @unlink($oldPath);
     }
 }
开发者ID:svobodni,项目名称:web,代码行数:17,代码来源:LayouteditFormFactory.php


注:本文中的Venne\Forms\Form::getValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。