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


PHP FormHelper::getOptionsFromSelect方法代码示例

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


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

示例1: populateState

 protected function populateState()
 {
     $crewlistNumber = JRequest::getInt('crewslist', 0);
     $birdDate = explode('/', JRequest::getVar('birthDate', '//'));
     $customerData = array('crewId' => JRequest::getInt('crewId'), 'orderId' => JRequest::getInt('orderId'), 'merchantId' => JRequest::getInt('merchantId'), 'nation' => FormHelper::getOptionsFromSelect($_POST, 'nation'), 'culture' => FormHelper::getOptionsFromSelect($_POST, 'culture'), 'documentId' => FormHelper::getOptionsFromSelect($_POST, 'documentId'), 'crewslist' => $crewlistNumber, 'firstName' => JRequest::getVar('firstName'), 'lastName' => JRequest::getVar('lastName'), 'email' => JRequest::getVar('email'), 'gender' => FormHelper::getOptionsFromSelect($_POST, 'gender'), 'birthDate' => $birdDate[2] . '-' . $birdDate[1] . '-' . $birdDate[0], 'birthLocation' => JRequest::getVar('birthLocation'), 'address' => JRequest::getVar('address'), 'city' => JRequest::getVar('city'), 'province' => JRequest::getVar('province'), 'postalCode' => JRequest::getVar('postalCode'), 'phone' => JRequest::getVar('phone'), 'documentNumber' => JRequest::getVar('documentNumber'), 'documentRelease' => JRequest::getVar('documentRelease'));
     $customerDatas = array($customerData);
     for ($i = 0; $i < $crewlistNumber; $i++) {
         $birdDate = explode('/', JRequest::getVar('birthDate' . $i, '//'));
         $customerData1 = array('crewId' => JRequest::getInt('crewId' . $i), 'parentCrewId' => JRequest::getInt('parentCrewId' . $i), 'orderId' => JRequest::getInt('orderId' . $i), 'merchantId' => JRequest::getInt('merchantId' . $i), 'nation' => FormHelper::getOptionsFromSelect($_POST, 'nation' . $i), 'firstName' => JRequest::getVar('firstName' . $i), 'lastName' => JRequest::getVar('lastName' . $i), 'gender' => FormHelper::getOptionsFromSelect($_POST, 'gender' . $i), 'birthDate' => $birdDate[2] . '-' . $birdDate[1] . '-' . $birdDate[0], 'birthLocation' => JRequest::getVar('birthLocation' . $i));
         $customerDatas[] = $customerData1;
     }
     $vars['crewId' . $i] = JRequest::getInt('crewId' . $i);
     $this->setState('params', array('orderId' => JRequest::getInt('orderId'), 'merchantId' => JRequest::getInt('merchantId'), 'crewId' => JRequest::getInt('crewId'), 'customerData' => $customerDatas));
     return parent::populateState();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:15,代码来源:crew.php

示例2: sendRating

 function sendRating()
 {
     $name = JRequest::getVar('name');
     $city = JRequest::getVar('city');
     $typologyid = FormHelper::getOptionsFromSelect($_POST, 'typologyid');
     $nation = FormHelper::getOptionsFromSelect($_POST, 'nation');
     // JRequest::getVar('nation');
     $email = JRequest::getVar('email');
     $value1 = JRequest::getVar('hfvalue1');
     $value2 = JRequest::getVar('hfvalue2');
     $value3 = JRequest::getVar('hfvalue3');
     $value4 = JRequest::getVar('hfvalue4');
     $value5 = JRequest::getVar('hfvalue5');
     $totale = JRequest::getVar('hftotale');
     $pregi = JRequest::getVar('pregi');
     $difetti = JRequest::getVar('difetti');
     $merchantId = JRequest::getVar('merchantid');
     $label = JRequest::getVar('label');
     $user = JFactory::getUser();
     $cultureCode = JRequest::getVar('cultureCode');
     $userId = null;
     if ($user->id != 0) {
         $userId = $user->id;
     }
     $checkin = JRequest::getVar('checkin');
     $resourceId = JRequest::getVar('resourceId');
     $hashorder = JRequest::getVar('hashorder');
     $orderId = null;
     if (empty($resourceId)) {
         $resourceId = null;
     }
     if (!empty($hashorder)) {
         //	 controllo se ho un ordine
         $orderId = BFCHelper::decrypt($hashorder);
         // controllo che l'ordine sia numerico altrimenti non lo considero
         if (!is_numeric($orderId)) {
             $orderId = null;
         }
     }
     $return = BFCHelper::setRating($name, $city, $typologyid, $email, $nation, $merchantId, $value1, $value2, $value3, $value4, $value5, $totale, $pregi, $difetti, $userId, $cultureCode, $checkin, $resourceId, $orderId, $label);
     if ($return < 1) {
         $return = "";
     }
     echo $return;
     $app = JFactory::getApplication();
     $app->close();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:47,代码来源:controller.php

示例3: populateState

 protected function populateState()
 {
     $crewlistNumber = JRequest::getInt('crewslist', 0);
     $birdDate = explode('/', JRequest::getVar('birthDate', '//'));
     $nation = '';
     $culture = '';
     $documentId = '';
     $gender = '';
     if (isset($_POST['form'])) {
         $nation = FormHelper::getOptionsFromSelect($_POST, 'nation');
         $culture = FormHelper::getOptionsFromSelect($_POST, 'culture');
         $documentId = FormHelper::getOptionsFromSelect($_POST, 'documentId');
         $gender = FormHelper::getOptionsFromSelect($_POST, 'gender');
     }
     $customerData = array('CrewId' => JRequest::getInt('crewId'), 'OrderId' => JRequest::getInt('orderId'), 'MerchantId' => JRequest::getInt('merchantId'), 'Nation' => $nation, 'Culture' => $culture, 'DocumentId' => $documentId, 'crewslist' => $crewlistNumber, 'FirstName' => JRequest::getVar('firstName'), 'LastName' => JRequest::getVar('lastName'), 'Email' => JRequest::getVar('email'), 'Gender' => $gender, 'BirthDate' => $birdDate[2] . '-' . $birdDate[1] . '-' . $birdDate[0], 'BirthLocation' => JRequest::getVar('birthLocation'), 'Address' => JRequest::getVar('address'), 'City' => JRequest::getVar('city'), 'Province' => JRequest::getVar('province'), 'PostalCode' => JRequest::getVar('postalCode'), 'Phone' => JRequest::getVar('phone'), 'DocumentNumber' => JRequest::getVar('documentNumber'), 'DocumentReleaseDate' => JRequest::getVar('documentRelease'));
     $customerDatas = array($customerData);
     for ($i = 0; $i < $crewlistNumber; $i++) {
         $birdDate = explode('/', JRequest::getVar('birthDate' . $i, '//'));
         $nation = '';
         $gender = '';
         if (isset($_POST['form'])) {
             $nation = FormHelper::getOptionsFromSelect($_POST, 'nation' . $i);
             $gender = FormHelper::getOptionsFromSelect($_POST, 'gender' . $i);
         }
         $customerData1 = array('CrewId' => JRequest::getInt('crewId' . $i), 'ParentCrewId' => JRequest::getInt('parentCrewId' . $i), 'OrderId' => JRequest::getInt('orderId' . $i), 'MerchantId' => JRequest::getInt('merchantId' . $i), 'Nation' => $nation, 'FirstName' => JRequest::getVar('firstName' . $i), 'LastName' => JRequest::getVar('lastName' . $i), 'Gender' => $gender, 'BirthDate' => $birdDate[2] . '-' . $birdDate[1] . '-' . $birdDate[0], 'BirthLocation' => JRequest::getVar('birthLocation' . $i));
         $customerDatas[] = $customerData1;
     }
     $vars['crewId' . $i] = JRequest::getInt('crewId' . $i);
     $this->setState('params', array('orderId' => JRequest::getInt('orderId'), 'merchantId' => JRequest::getInt('merchantId'), 'crewId' => JRequest::getInt('crewId'), 'customerData' => $customerDatas));
     return parent::populateState();
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:crew.php


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