當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Country::getCountriesOptionsByRegion方法代碼示例

本文整理匯總了PHP中app\models\Country::getCountriesOptionsByRegion方法的典型用法代碼示例。如果您正苦於以下問題:PHP Country::getCountriesOptionsByRegion方法的具體用法?PHP Country::getCountriesOptionsByRegion怎麽用?PHP Country::getCountriesOptionsByRegion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Country的用法示例。


在下文中一共展示了Country::getCountriesOptionsByRegion方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: passData

 private function passData($id = null)
 {
     $people = new \App\Models\People();
     $address = new \App\Models\Addresses();
     $employee = new \App\Models\Employee();
     if (!is_null($id)) {
         $people = People::findOrNew($id);
         $universityHisttory = $people->universityHistory()->get();
         $careerHistory = $people->careerHistory()->get();
         $employee = $people->employee()->first();
         if ($people->address()->first()) {
             $address = $people->address()->get()->first();
         }
     } else {
         if (!Session::has('UniversityHistory')) {
             Session::set('UniversityHistory', $people->universityHistory()->get());
         }
         if (!Session::has('CareerHistory')) {
             Session::set('CareerHistory', $people->careerHistory()->get());
         }
         $universityHisttory = Session::get('UniversityHistory');
         $careerHistory = Session::get('CareerHistory');
     }
     $pTitle = PeopleTitle::all()->sortBy("Title_Name")->toArray();
     foreach ($pTitle as $peopTitle) {
         $peopleTitle[$peopTitle["id_People_Title"]] = $peopTitle["Title_Name"];
     }
     $employeeType = EmployeeType::getEmployeeTypeOptions();
     $countryModel = $address->getCountry();
     $regionsOptions = Region::getRegionsOptions();
     $countryOptions = Country::getCountriesOptionsByRegion($countryModel->id_Region);
     return compact("countryOptions", "regionsOptions", "employeeType", "people", "peopleTitle", "universityHisttory", "careerHistory", "employee", "address");
 }
開發者ID:rowanhwilliams,項目名稱:ftm-php,代碼行數:33,代碼來源:EmployeeController.php

示例2: passData

 private function passData($id = null)
 {
     $jobs = new \App\Models\Jobs();
     if (!is_null($id)) {
         $jobs = Jobs::findOrNew($id);
     }
     $companyPreference = $jobs->getCompanyPreference() ? $jobs->getCompanyPreference() : new \App\Models\CompanyPreference();
     $address = $jobs->address()->first() ? $jobs->address()->first() : new \App\Models\Addresses();
     $commOrBon = CommisionOrBonus::all()->sortBy("Commission_Or_Bonus")->toArray();
     $lns = SupportedLanguages::all()->sortBy("Language_Name")->toArray();
     if (sizeof($commOrBon) == 0) {
         $commOrBon = new \App\Models\CommisionOrBonus();
     }
     $tEndUser = TargetEndUser::all()->sortBy("Target_End_User")->toArray();
     foreach ($commOrBon as $commisionOrBonusVal) {
         $commisionOrBonus[$commisionOrBonusVal["id_Commission_Or_Bonus"]] = $commisionOrBonusVal["Commission_Or_Bonus"];
     }
     foreach ($tEndUser as $tgEndUser) {
         $targetEndUser[$tgEndUser["id_Target_End_User"]] = $tgEndUser["Target_End_User"];
     }
     foreach ($lns as $langs) {
         $languages[$langs["id_Language"]] = $langs["Language_Name"];
     }
     $companies = Companies::SelectOptionsModel();
     $jobType = $jobs->getJobType();
     $jobFamilyOptions = JobFamily::getJobsFamilyOptions();
     $jobTypesOptions = JobType::getJobsTypesByJobFamilyOptions($jobType->id_Job_Family);
     $countryModel = $address->getCountry();
     $regionsOptions = Region::getRegionsOptions();
     $countryOptions = Country::getCountriesOptionsByRegion($countryModel->id_Region);
     return compact("companies", "commisionOrBonus", "targetEndUser", "jobFamilyOptions", "regionsOptions", "countryOptions", "languages", "jobs", "companyPreference", "address", "jobTypesOptions");
 }
開發者ID:rowanhwilliams,項目名稱:ftm-php,代碼行數:32,代碼來源:JobsController.php

示例3: getCoutryByRegion

 public function getCoutryByRegion($regionId)
 {
     $countries = [];
     foreach (Country::getCountriesOptionsByRegion($regionId) as $index => $country) {
         $localObject = new \stdClass();
         $localObject->id_Country = $index;
         $localObject->Country = $country;
         $countries[] = $localObject;
     }
     return json_encode($countries);
 }
開發者ID:rowanhwilliams,項目名稱:ftm-php,代碼行數:11,代碼來源:AjaxController.php


注:本文中的app\models\Country::getCountriesOptionsByRegion方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。