当前位置: 首页>>代码示例>>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;未经允许,请勿转载。