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


PHP Language::find方法代碼示例

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


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

示例1: availableLangs

 /**
  * Get available languages list
  *
  * @return mixed
  */
 function availableLangs()
 {
     $objLang = new Language();
     //$conditions = $this->Access->isAdmin() ? array() : array('visible' => 1);
     $conditions = array();
     return $objLang->find('list', array('conditions' => $conditions));
 }
開發者ID:sgh1986915,項目名稱:cakephp2-bpong,代碼行數:12,代碼來源:LanguageHelper.php

示例2: initialize

 public function initialize($entity = null, $options = null)
 {
     $language = new Select('languagecode', Language::find(), array('using' => array('code', 'language'), 'useEmpty' => TRUE, 'emptyText' => $this->di->get('translate')->_('Select a Language')));
     $language->setLabel('Idioma');
     $this->add($language);
     $name = new Text('name');
     $name->setLabel('Name translation');
     $this->add($name);
     $description = new TextArea('description');
     $description->setLabel('Description translation');
     $this->add($description);
 }
開發者ID:andresfranco,項目名稱:Phalcontest,代碼行數:12,代碼來源:DishTranslationForm.php

示例3: generate

	function generate()
	{
		$localeDir = APP_PATH . 'locale' . DS;
		App::import('Model', 'Language');
		$Language = new Language();
		$languages = $Language->find('all');
		foreach($languages as $language){
			mkdir($localeDir . $language['Language']['code']);
			mkdir($localeDir . $language['Language']['code'] . DS . 'LC_MESSAGES');				
		}
		
	}
開發者ID:serumax,項目名稱:pitutaria,代碼行數:12,代碼來源:translations.php

示例4: initialize

 public function initialize($entity = null, $options = null)
 {
     $language = new Select('languagecode', Language::find(), array('using' => array('code', 'language'), 'useEmpty' => TRUE, 'emptyText' => $this->di->get('translate')->_('Seleccione un idioma')));
     $language->setLabel('Idioma');
     $this->add($language);
     $key = new Text('translatekey');
     $key->setLabel('Llave');
     $this->add($key);
     $value = new Text('translatevalue');
     $value->setLabel('Valor');
     $this->add($value);
 }
開發者ID:andresfranco,項目名稱:Phalcontest,代碼行數:12,代碼來源:TranslationForm.php

示例5: initialize

 public function initialize($entity = null, $options = null)
 {
     $language = new Select('languagecode', Language::find(), array('using' => array('code', 'language'), 'useEmpty' => TRUE, 'emptyText' => $this->di->get('translate')->_('Select a Language')));
     $language->setLabel('Idioma');
     $this->add($language);
     $title = new Text('title');
     $title->setLabel('Title');
     $this->add($title);
     $content = new TextArea('content', array('id' => 'summernote', 'name' => 'content', 'class' => 'summernote'));
     $content->setLabel('Content');
     $this->add($content);
 }
開發者ID:andresfranco,項目名稱:Phalcontest,代碼行數:12,代碼來源:ArticleTranslationForm.php

示例6: get_languages

 public function get_languages()
 {
     $entity = Language::find();
     return $entity;
 }
開發者ID:andresfranco,項目名稱:Phalcontest,代碼行數:5,代碼來源:ControllerBase.php

示例7: function

     return View::make('cvbuilder.section_views.edit_new_section', ['section' => $section]);
 });
 Route::get('/edit_ui_workex/{id}', function ($id) {
     $work = WorkExperience::find($id);
     return View::make('cvbuilder.section_views.edit_work', ['work' => $work]);
 });
 Route::get('/edit_ui_education/{id}', function ($id) {
     $education = Education::find($id);
     return View::make('cvbuilder.section_views.edit_education', ['edu' => $education]);
 });
 Route::get('/edit_ui_nysc/{id}', function ($id) {
     $nysc = Nysc::find($id);
     return View::make('cvbuilder.section_views.edit_nysc', ['nysc' => $nysc]);
 });
 Route::get('/edit_ui_language/{id}', function ($id) {
     $language = Language::find($id);
     $langs = DB::table('langs')->lists('language', 'id');
     $langs = array("0" => "Select") + $langs + array("-1" => "Others");
     $levels = DB::table('levels')->lists('level', 'id');
     $abilities = DB::table('abilities')->lists('ability', 'id');
     return View::make('cvbuilder.section_views.edit_language', ['lang' => $language, 'langs' => $langs, 'levels' => $levels, 'abilities' => $abilities]);
 });
 Route::post('/fetch_addsection', 'CVController@postSection');
 Route::post('/edit_section', 'CVController@putSection');
 Route::post('/edit_work', 'CVController@putwork');
 Route::post('/edit_education', 'CVController@puteducation');
 Route::post('/edit_nysc', 'CVController@putnysc');
 Route::post('/edit_language', 'CVController@putlanguage');
 Route::post('/edit_profile', 'CVController@putprofile');
 Route::get('/preview/{code}/{style}/{type}', 'CVController@getPreview');
 Route::get('/pdf/{type}/{code}/{style}', 'CVController@getPDF');
開發者ID:vishu87,項目名稱:cpr,代碼行數:31,代碼來源:routes.php

示例8: array

?>
        
	<?php 
echo $form->field($model, 'lname', array('maxlength' => 80));
?>

	<?php 
echo $form->passwordFieldRow($model, 'passwd', array('maxlength' => 41));
?>

	<?php 
echo $form->field($model, 'email', array('maxlength' => 255));
?>

        <?php 
echo $form->dropDownListRow($model, 'language', \yii\helpers\ArrayHelper::map(Language::find()->All(), 'id', 'name'));
?>

        <?php 
echo $form->dropDownListRow($model, 'timezone', Timezone::makeList());
?>
        
        <?php 
//echo $form->field($model,'theme');
?>
        <div class="form-actions">
		<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'success', 'label' => Yii::t('app', 'Create')));
?>
	</div>
        
開發者ID:chaimvaid,項目名稱:linet3,代碼行數:30,代碼來源:user.php

示例9: putLanguage

 public function putLanguage()
 {
     $cre = ['language_id' => Input::get('language_id'), 'ability' => Input::get('ability'), 'level' => Input::get('level')];
     $rules = ['language_id' => 'required|not_in:0', 'ability' => 'required', 'level' => 'required'];
     $validator = Validator::make($cre, $rules);
     if ($validator->passes()) {
         $language = Language::find(Input::get('language_edit'));
         $cv = Cv::select('id')->where('cv_code', Input::get('cv_code'))->first();
         if ($cv->id == $language->cv_id) {
             if (Input::get('language_id') == -1 && Input::get('language_name') == '') {
                 $data["success"] = false;
                 $data["message"] = 'Please fill the other language name';
             } else {
                 $language->language_id = Input::get('language_id');
                 if ($language->language_id == -1) {
                     $language->language_name = Input::get('language_name');
                 }
                 $language->ability_id = Input::get('ability');
                 $language->level_id = Input::get('level');
                 $language->save();
                 $data["success"] = true;
                 $data["message"] = 'Language is succefully updated';
                 if ($language->language_id != -1) {
                     $lang = DB::table('langs')->select('language')->where('id', $language->language_id)->first();
                     $data["language_id"] = $lang->language;
                 } else {
                     $data["language_id"] = Input::get('language_name');
                 }
                 $data["language_name"] = Input::get('language_name');
                 $ability = DB::table('abilities')->select('ability')->where('id', $language->ability_id)->first();
                 $data["ability"] = $ability->ability;
                 $level = DB::table('levels')->select('level')->where('id', $language->level_id)->first();
                 $data["level"] = $level->level;
             }
         } else {
             $data["success"] = false;
             $data["message"] = 'Error in editing language';
         }
     } else {
         $data["success"] = false;
         $data["message"] = 'Please fill all required fields';
     }
     return json_encode($data);
 }
開發者ID:vishu87,項目名稱:cpr,代碼行數:44,代碼來源:CVController.php


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