本文整理汇总了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();
}
示例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();
}
示例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();
}