} else { echo "<td> </td>"; } } else { echo "<td> </td>"; } } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) { echo "<td style='align:center; valign:'middle';'>" . EmpDesignation::findOne($sd['emp_master_designation_id'])->emp_designation_name . "</td>"; } else { echo "<td> </td>"; } } else { if ($s == 'emp_category_name') { echo "<td style='align:center; valign:'middle';'>" . EmpCategory::findOne($sd['emp_master_category_id'])->emp_category_name . "</td>"; } else { if ($s == 'emp_cadd') { if ($sd['emp_master_emp_address_id'] != 0) { if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)) { $add_c = "<br/>" . City::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)->city_name . ", "; } else { $add_c = ''; } if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_state)) { $add_s = State::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_state)->state_name . ", "; } else { $add_s = ''; } if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_country)) { $add_co = Country::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_country)->country_name;
} else { echo "<td> </td>"; } } else { echo "<td> </td>"; } } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) { echo "<td class='text-center'>" . EmpDesignation::findOne($sd['emp_master_designation_id'])->emp_designation_name . "</td>"; } else { echo "<td> </td>"; } } else { if ($s == 'emp_category_name') { echo "<td class='text-center'>" . EmpCategory::findOne($sd['emp_master_category_id'])->emp_category_name . "</td>"; } else { if ($s == 'emp_cadd') { if ($sd['emp_master_emp_address_id'] != 0) { if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)) { $add_c = "<br/>" . City::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)->city_name . ", "; } else { $add_c = ''; } if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_state)) { $add_s = State::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_state)->state_name . ", "; } else { $add_s = ''; } if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_country)) { $add_co = Country::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_country)->country_name;
/** * @return \yii\db\ActiveQuery */ public function getEmpCategories() { return $this->hasMany(EmpCategory::className(), ['created_by' => 'user_id']); }