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


PHP Zend_Form::getValue方法代码示例

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


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

示例1: loginAction

 public function loginAction()
 {
     $configForm = $this->getInvokeArg('bootstrap')->getResource('configForm');
     $loginForm = new \Zend_Form($configForm->login);
     if ($this->getRequest()->isPost()) {
         if ($loginForm->isValid($_POST)) {
             try {
                 $auth = $this->getInvokeArg('bootstrap')->auth;
                 $auth->setIdentity($loginForm->getValue('login'))->setCredential($loginForm->getValue('password'));
                 $result = \Zend_Auth::getInstance()->authenticate($auth);
                 if ($result->isValid()) {
                     $this->_redirect('/admin');
                 } else {
                     $this->_helper->systemMessages('error', 'Anmeldung verweigert');
                 }
             } catch (\Exception $e) {
                 $log = $this->getInvokeArg('bootstrap')->log;
                 $log->log($e->getMessage(), \Zend_Log::ERR, array('trace' => $e->getTraceAsString()));
                 $this->_helper->systemMessages('error', 'Fehler bei der Anmeldung');
             }
         }
     }
     $loginForm->setAction('/login');
     $this->view->form = $loginForm;
 }
开发者ID:kromeyer,项目名称:MMK-Newsroom,代码行数:25,代码来源:IndexController.php

示例2: setModel

 public function setModel(Zend_Form $form, \Model\EmployeeTraining $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->training = $em->find("Training", $values['training']);
     $model->employee = $em->find("Employee", $form->getValue("parent"));
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:7,代码来源:EmployeeTrainingsController.php

示例3: getPartnerFilterFromForm

 private function getPartnerFilterFromForm(Zend_Form $form)
 {
     $filter = new KalturaPartnerFilter();
     $filterType = $form->getValue('filter_type');
     $filterInput = $form->getValue('filter_input');
     $includeActive = $form->getValue('include_active');
     $includeBlocked = $form->getValue('include_blocked');
     $includeRemoved = $form->getValue('include_removed');
     if ($filterType == 'byid') {
         $filter->idIn = $filterInput;
     } else {
         if ($filterType == 'byname') {
             $filter->nameLike = $filterInput;
         } elseif ($filterType == 'free' && $filterInput) {
             $filter->partnerNameDescriptionWebsiteAdminNameAdminEmailLike = $filterInput;
         }
     }
     $statuses = array();
     if ($includeActive) {
         $statuses[] = KalturaPartnerStatus::ACTIVE;
     }
     if ($includeBlocked) {
         $statuses[] = KalturaPartnerStatus::BLOCKED;
     }
     if ($includeRemoved) {
         $statuses[] = KalturaPartnerStatus::FULL_BLOCK;
     }
     $filter->statusIn = implode(',', $statuses);
     $filter->orderBy = KalturaPartnerOrderBy::ID_DESC;
     return $filter;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:31,代码来源:PartnerUsageController.php

示例4: setModel

 public function setModel(Zend_Form $form, \Model\Renouncement $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->documentSendDate = $values['document_send_date'];
     $model->policyCreateDate = $values['policy_create_date'];
     $model->policyNumber = $values['policy_number'];
     $model->customer = $em->find("Customer", $form->getValue("parent"));
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:9,代码来源:CustomerRenouncementsController.php

示例5: setModel

 public function setModel(Zend_Form $form, \Model\CustomerHistory $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->date = $values['date'];
     $model->info = $values['info'];
     $model->customer = $em->find("Customer", $form->getValue("parent"));
     $model->instruction = $em->find("Instruction", $values['instruction']);
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:9,代码来源:CustomerHistoryController.php

示例6: setModel

 public function setModel(\Zend_Form $form, \Model\CustomerAddress $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->city = $values['city'];
     $model->postcode = $values['postcode'];
     $model->state = $em->find("State", $values['state']);
     $model->street = $values['street'];
     $model->addressType = $values['address_type'];
     $model->houseNumber = $values['house_number'];
     $model->flatNumber = $values['flat_number'];
     $model->customer = $em->find("Customer", $form->getValue("parent"));
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:13,代码来源:CustomerAddressesController.php

示例7: bookingAction

 /** THis is where they pick the duration */
 function bookingAction()
 {
     $this->layout('layout/layout-appointment-summary');
     $layoutViewModel = $this->layout();
     $progress = new ViewModel(['step' => 3]);
     $progress->setTemplate('application/progress');
     $layoutViewModel->addChild($progress, 'progress');
     $service = $this->serviceDataMapper()->find($this->params('service'));
     $durations = array();
     foreach ($service['durations'] as $duration) {
         $durations[$duration] = $this->durationLabels[$duration];
     }
     $form = new \Zend_Form();
     $form->addElement('radio', 'appointment_duration', array('label' => 'Appointment Duration', 'multiOptions' => $durations, 'separator' => ''));
     if ($this->getRequest()->isPost() && $form->isValid($this->params()->fromPost())) {
         $url = $this->url()->fromRoute('make-booking', array('action' => 'booking2', 'duration' => $form->getValue('appointment_duration'), 'service' => $this->params('service'), 'day' => $this->params('day')));
         $this->redirect()->toUrl($url);
         return;
     }
     $this->viewParams['form'] = $form;
     $summary = new ViewModel($this->params()->fromRoute());
     $summary->setTemplate('application/summary');
     $layoutViewModel->addChild($summary, 'appointment_summary');
     $viewModel = new ViewModel($this->viewParams);
     $viewModel->setTemplate('application/booking');
     return $viewModel;
 }
开发者ID:mustafakarali,项目名称:application,代码行数:28,代码来源:MakebookingController.php

示例8: indexAction

 public function indexAction()
 {
     $session = new \Zend_Session_Namespace('twitter', true);
     $oauthConfig = array('callbackUrl' => 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'siteUrl' => 'http://twitter.com/oauth');
     $configForm = $this->getInvokeArg('bootstrap')->getResource('configForm');
     $twitterApiForm = new \Zend_Form($configForm->twitterApi);
     if ($this->getRequest()->isPost()) {
         if ($twitterApiForm->isValid($_POST)) {
             try {
                 $this->twitterRepository->saveEntity($twitterApiForm->getValues());
                 $oauthConfig['consumerKey'] = $twitterApiForm->getValue('consumerKey');
                 $oauthConfig['consumerSecret'] = $twitterApiForm->getValue('consumerSecret');
                 $consumer = new \Zend_Oauth_Consumer($oauthConfig);
                 $token = $consumer->getRequestToken();
                 $session->twitterRequestToken = serialize($token);
                 $consumer->redirect();
             } catch (\Exception $e) {
                 $log = $this->getInvokeArg('bootstrap')->log;
                 $log->log($e->getMessage(), \Zend_Log::ERR, array('trace' => $e->getTraceAsString()));
                 $this->_helper->systemMessages('error', 'Einstellungen konnte nicht gespeichert werden');
             }
         }
     } else {
         try {
             $entity = $this->twitterRepository->fetchEntity();
             if ($entity) {
                 if (isset($session->twitterRequestToken)) {
                     $oauthConfig['consumerKey'] = $entity->consumerKey;
                     $oauthConfig['consumerSecret'] = $entity->consumerSecret;
                     $consumer = new \Zend_Oauth_Consumer($oauthConfig);
                     $token = $consumer->getAccessToken($_GET, unserialize($session->twitterRequestToken));
                     $this->twitterRepository->saveEntity(array('accessToken' => serialize($token)));
                     unset($session->twitterRequestToken);
                     $this->_helper->systemMessages('notice', 'Einstellungen erfolgreich gespeichert');
                 }
                 $twitterApiForm->populate($entity->toArray());
             }
         } catch (\Exception $e) {
             $log = $this->getInvokeArg('bootstrap')->log;
             $log->log($e->getMessage(), \Zend_Log::ERR, array('trace' => $e->getTraceAsString()));
             $this->_helper->systemMessages('error', 'Einstellungen konnte nicht gespeichert werden');
         }
     }
     $twitterApiForm->setAction('/admin/twitter');
     $this->view->form = $twitterApiForm;
 }
开发者ID:kromeyer,项目名称:MMK-Newsroom,代码行数:46,代码来源:TwitterController.php

示例9: setModel

 public function setModel(Zend_Form $form, \Model\InstitutionProduct $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->name = $values['name'];
     $model->active = $values['active'];
     $model->institution = $em->find("Institution", $values['institution']);
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:8,代码来源:InstitutionProductsController.php

示例10: save

 private function save(Zend_Form $form)
 {
     $id = (int) $form->getValue('id');
     $category = new GC\Entity\Category(array('id' => $id));
     if ($id != 0) {
         $category = $this->_em->find('GC\\Entity\\Category', $id);
     }
     $category->populate($form->getValues());
     $this->_em->getRepository('GC\\Entity\\Category')->save($category);
 }
开发者ID:richardlawson,项目名称:gcblog,代码行数:10,代码来源:IndexController.php

示例11: setModel

 public function setModel(Zend_Form $form, \Model\CustomerCredit $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->amount = $values['amount'];
     $model->balance = $values['balance'];
     $model->balanceDate = $values['balance_date'];
     $model->bank = $values['bank'];
     $model->conclusionDateStart = $values['conclusion_date_start'];
     $model->costOfRepayment = $values['cost_of_repayment'];
     $model->currency = $em->find("Currency", $values['currency']);
     $model->currencyRate = $values['currency_rate'];
     $model->installment = $values['installment'];
     $model->periodInMonths = $values['period_in_months'];
     $model->type = $em->find("CreditType", $values["type"]);
     $model->margin = $values['margin'];
     $model->rrso = $values['rrso'];
     $model->customer = $em->find("Customer", $form->getValue("parent"));
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:19,代码来源:CustomerCreditsController.php

示例12: setModel

 public function setModel(Zend_Form $form, \Model\CustomerOldProduct $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->institution = $em->find("Institution", $values['institution']);
     $model->institutionProduct = $em->find("InstitutionProduct", $values['institution_product']);
     $model->instruction = $em->find("Instruction", $values['instruction']);
     $model->insuranceSum = $values['insurance_sum'];
     $model->insuranceSumNnw = $values['insurance_sum_nnw'];
     $model->insuranceSumNkw = $values['insurance_sum_nkw'];
     $model->conclusionDateStart = $values['conclusion_date_start'];
     $model->conclusionDateEnd = $values['conclusion_date_end'];
     $model->fee = $values['fee'];
     $model->premiumType = $em->find("PremiumType", $values['premium_type']);
     $model->contribution = $values['contribution'];
     $model->amount = $values['amount'];
     $model->productCreateDate = $values['create_date'];
     $model->policyNumber = $values['policy_number'];
     $model->description = $values['description'];
     $model->customer = $em->find("Customer", $form->getValue("parent"));
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:21,代码来源:CustomerOldProductsController.php

示例13: setPolicy

 public function setPolicy(\Zend_Form $form, \Model\Policy $policy, \Model\Application $application)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("policy");
     $policy->application = $application;
     $policy->outerNumber = $values['policy_outer_number'];
     $policy->createDate = $values['policy_create_date'];
     $policy->endDate = $values['policy_end_date'];
     $policy->popPlace = $values['policy_pop_place'];
     $policy->deliveryDate = $values['policy_delivery_date'];
     $policy->popReturnDate = $values['policy_pop_return_date'];
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:12,代码来源:ApplicationsController.php

示例14: setModel

 public function setModel(\Zend_Form $form, \Model\Shipment $model)
 {
     $em = EntityManager::getInstance();
     $values = $form->getValue("basic");
     $model->createDate = date("Y-m-d H:i:s");
     $model->street = $values['street'];
     $model->email = $values['email'];
     $model->city = $values['city'];
     $model->postcode = $values['postcode'];
     $model->state = $em->find("State", $values['state']);
     $model->type = $em->find("ShipmentType", $values['type']);
     $model->phoneNumber = $values['phone_number'];
 }
开发者ID:sp1ke77,项目名称:MLM-1,代码行数:13,代码来源:ApplicationShipmentsController.php

示例15: testGetValueCanReturnSubFormValuesFromArrayToWhichElementsBelong

 public function testGetValueCanReturnSubFormValuesFromArrayToWhichElementsBelong()
 {
     $subForm = new Zend_Form_SubForm();
     $subForm->addElements(array('foo' => 'text', 'bar' => 'text'))->setElementsBelongTo('subform');
     $subForm->foo->setValue('foo value');
     $subForm->bar->setValue('bar value');
     $this->form->addSubForm($subForm, 'page1');
     $values = $this->form->getValue('subform');
     $this->assertTrue(isset($values['foo']), var_export($values, 1));
     $this->assertTrue(isset($values['bar']));
     $this->assertEquals($subForm->foo->getValue(), $values['foo']);
     $this->assertEquals($subForm->bar->getValue(), $values['bar']);
 }
开发者ID:vicfryzel,项目名称:zf,代码行数:13,代码来源:FormTest.php


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