$this->parentInstitutionID]); return ''.$this->institutionFullName.''; } public function rules(){ return [ [['institutionShort', 'institutionFullName', 'city', 'Latitude', 'Longitude', 'country', 'memberStatus','CITES_code'],'required'], [['onlineSince','logoURL','IPEN_member','dateOfJoining','urlMTA','urlLoanPolicies'],'default','value'=>null], [['CITES_code'],'default','value'=>'not registered'], [['Latitude'], 'number', 'min' => -90, 'max' => 90], [['Longitude'], 'number', 'min' => -180, 'max' => 180], [['isMember','isMemberOfConsortium','votingMember'],'default','value'=>'0'], ]; } public function attributeLabels(){ return [ ]; } /** * @inheritdoc */ public function scenarios() { // bypass scenarios() implementation in the parent class return Model::scenarios(); } /** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = InstitutionForm::find()->select('parentInstitution.*,parentInstitution.institutionFullName as Updateurl'); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => ['attributes' => ['Updateurl','country','dateOfJoining','isMember','memberStatus','institutionFullName','isMemberOfConsortium']] ]); $this->load($params); if (!$this->validate()) { return $dataProvider; } return $dataProvider; } }