Beispiel #1
0
 /**
  * Returns language objects.
  * @param boolean $active True/False according to the status of the language.
  * @return Languages|array
  */
 public static function getLanguages($active = true)
 {
     if ($active) {
         return Languages::find()->where(['status' => static::STATUS_ACTIVE])->all();
     } else {
         return Languages::find()->all();
     }
 }
Beispiel #2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Languages::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['language_id' => SORT_DESC]]]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['language_id' => $this->language_id, 'created_at' => $this->created_at, 'created_by' => $this->created_by, 'updated_at' => $this->updated_at, 'updated_by' => $this->updated_by]);
     $query->andFilterWhere(['like', 'language_name', $this->language_name]);
     unset($_SESSION['exportData']);
     $_SESSION['exportData'] = $dataProvider;
     return $dataProvider;
 }
Beispiel #3
0
	    	
		</div>
	</div>

	<div class="col-xs-12 col-lg-12 col-lg-12">
		<div class = "col-sm-12 col-xs-12">
		 <?php 
echo $form->field($info, 'emp_specialization')->textInput(['maxlength' => 85]);
?>
		</div>
	</div>
	
	<div class="col-xs-12 col-lg-12 col-lg-12">
		<div class = "col-sm-12 col-xs-12">
		 <?php 
$data = ArrayHelper::map(Languages::find()->asArray()->all(), 'language_name', 'language_name');
foreach ($data as $d) {
    $langss[] = $d;
}
echo $form->field($info, 'emp_languages')->widget(Select2::classname(), ['name' => 'emp_languages[]', 'options' => ['placeholder' => ''], 'pluginOptions' => ['tags' => $langss, 'maximumInputLength' => 10, 'multiple' => true]]);
?>
 
		</div>
	</div>

	<div class="col-xs-12 col-lg-12 col-lg-12">
		<div class = "col-sm-12 col-xs-12">
		  <?php 
echo $form->field($info, 'emp_hobbies')->textInput(['maxlength' => 35]);
?>
		</div>