本文整理汇总了PHP中app\models\Region::getRegionsOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Region::getRegionsOptions方法的具体用法?PHP Region::getRegionsOptions怎么用?PHP Region::getRegionsOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Region
的用法示例。
在下文中一共展示了Region::getRegionsOptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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");
}
示例2: 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");
}