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


PHP Default_Model_Countries::getAllCountries方法代码示例

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


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

示例1: init


//.........这里部分代码省略.........
     $weblinks_name_site4 = new Zend_Form_Element_Text('weblinks_name_site4');
     $weblinks_name_site4->setLabel('Web site 4')->setAttrib('id', 'website4-name')->setAttrib('id', 'website2-name')->addValidators(array(array('StringLength', false, array(0, 45, 'messages' => array('stringLengthTooLong' => $nameTooLongText)))));
     $weblinks_url_site4 = new Zend_Form_Element_Text('weblinks_url_site4');
     $weblinks_url_site4->setAttrib('id', 'website4-url')->addValidators(array(new Oibs_Validators_UrlValidator(), array('StringLength', false, array(0, 150, 'messages' => array('stringLengthTooLong' => $urlTooLongText)))));
     $weblinks_name_site5 = new Zend_Form_Element_Text('weblinks_name_site5');
     $weblinks_name_site5->setLabel('Web site 5')->setAttrib('id', 'website5-name')->setAttrib('id', 'website2-name')->addValidators(array(array('StringLength', false, array(0, 45, 'messages' => array('stringLengthTooLong' => $nameTooLongText)))));
     $weblinks_url_site5 = new Zend_Form_Element_Text('weblinks_url_site5');
     $weblinks_url_site5->setAttrib('id', 'website5-url')->addValidators(array(new Oibs_Validators_UrlValidator(), array('StringLength', false, array(0, 150, 'messages' => array('stringLengthTooLong' => $urlTooLongText)))));
     $languages = new Default_Model_Languages();
     $allLanguages = $languages->getAllNamesAndIds();
     $userlanguage = new Zend_Form_Element_Select('userlanguage');
     $userlanguage->setLabel('User interface language')->setAttrib('id', 'user-interface-language')->addMultiOption('', 'Select');
     foreach ($allLanguages as $language) {
         $userlanguage->addMultiOption($language['id_lng'], $language['name_lng']);
     }
     $userlanguageclear = new Oibs_Form_Element_Note('userlanguageclear');
     $userlanguageclear->setValue($clear);
     /*
             $avatar = new Zend_Form_Element_File('avatar');
             $avatar->setLabel('Avatar image');
     */
     // DB: city
     $hometown = new Zend_Form_Element_Text('city');
     $hometown->setLabel('Hometown')->setAttrib('id', 'hometown')->setRequired(true)->addValidators(array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Hometown empty'))), array('Regex', true, array('/^[\\p{L}0-9.\\- ]*$/'))));
     $hometownpublic = new Zend_Form_Element_Checkbox('city_publicity');
     $hometownpublic->setLabel($publictext);
     $hometownpublic->helper = 'FormHidden';
     $address = new Zend_Form_Element_Text('address');
     $address->setLabel('Address')->setAttrib('id', 'address');
     $addresspublic = new Zend_Form_Element_Checkbox('address_publicity');
     $addresspublic->setLabel($publictext)->setAttrib('checked', 'checked')->setValue(1);
     $addresspublic->helper = 'FormHidden';
     $country_model = new Default_Model_Countries();
     $allCountries = $country_model->getAllCountries();
     $usercountry = new Zend_Form_Element_Select('country');
     $usercountry->setLabel('Country of Residence')->setAttrib('id', 'country')->addMultiOption('', 'Select');
     foreach ($allCountries as $country) {
         $usercountry->addMultiOption($country['iso_ctr'], $country['printable_name_ctr']);
     }
     $usercountrypublic = new Zend_Form_Element_Checkbox('country_publicity');
     $usercountrypublic->setLabel($publictext);
     $timezone_model = new Default_Model_Timezones();
     $allTimezones = $timezone_model->getAllTimezones();
     $usertimezone = new Zend_Form_Element_Select('usertimezone');
     $usertimezone->setLabel('Time Zone')->setAttrib('id', 'time-zone')->addMultiOption('', 'Select');
     foreach ($allTimezones as $timezone) {
         $usertimezone->addMultiOption($timezone['id_tmz'], $timezone['gmt_tmz'] . ' ' . $timezone['timezone_location_tmz']);
     }
     $usertimezonepublic = new Zend_Form_Element_Checkbox('usertimezone_publicity');
     $usertimezonepublic->setLabel($publictext);
     $userProfilesModel = new Default_Model_UserProfiles();
     $employments = $userProfilesModel->getEmployments();
     $employments = array_merge(array('' => 'Select'), $employments);
     $employment = new Zend_Form_Element_Select('employment');
     $employment->setLabel('I am currently')->setAttrib('id', 'status')->setRequired(true)->addMultiOptions($employments)->setErrorMessages(array('Select status'));
     $employmentpublic = new Zend_Form_Element_Checkbox('employment_publicity');
     $employmentpublic->setLabel($publictext);
     // DB: company
     $employer_organization = new Zend_Form_Element_Text('company');
     $employer_organization->setLabel('Employer / Organization')->setAttrib('id', 'employer-organization');
     $employer_organizationpublic = new Zend_Form_Element_Checkbox('company_publicity');
     $employer_organizationpublic->setLabel($publictext);
     //Subscribe things
     $favouritesModel = new Default_Model_UserHasFavourites();
     $subscribeOptions = $favouritesModel->getFollows();
     unset($subscribeOptions['8']);
开发者ID:jannev,项目名称:site,代码行数:67,代码来源:AccountSettingsForm.php


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