_parameters; } public function getExtendedSearchFormTitle() { return $this->_extendedSearchFormTitle; } public function getPreviewTitle() { return $this->_previewTitle; } public function getDetailsTitle() { return $this->_detailsTitle; } public function getExtendedSearchButtonLabel() { return $this->_extendedSearchButtonLabel; } public function getNewSearchButtonLabel() { return $this->_newSearchButtonLabel; } public function getRefineSearchButtonLabel() { return $this->_refineSearchButtonLabel; } public function getFieldsPerRow() { return $this->_fieldsPerRow; } public function getSelectionListNonChosen() { return $this->_selectionListNonChosen; } public function getSugesstionListNoMatch() { return $this->_sugesstionListNoMatch; } public function getHideableList() { return $this->_hideableList; } public function getHideableListFields() { return $this->_hideableListFields; } public function getCompleteList() { // Rukeia 30-03-2015: added return $this->_completeList; } public function getCompleteListFields() { // Rukeia 30-03-2015: added return $this->_completeListFields; } public function getFieldSize() { return $this->_fieldSize; } // @override public function init() { foreach ( $this->_parameters as $key => $attr ) { if (isset ( $attr ['hideable'] ) && $attr ['hideable'] == 'true') { $this->_hideableList [] = $key; $this->_hideableListFields [] = $attr ['name']; } // Rukeia 30-03-2015: added $this->_completeList [] = $key; $this->_completeListFields [] = $attr ['name']; } } // ----------------- validation rules ------------------------ // @override /** * Declares the validation rules. * each field that has no rules has to be at least assigned to the 'safe' validator */ public function rules() { // Yii::info ( "RULES VALIDATION" ); return [ [ [ 'unitID', 'fullScientificName' ], 'trim' ], [ [ 'latitudeFrom', 'latitudeTo' ], 'number', 'min' => - 90, 'max' => 90 ], [ [ 'longitudeFrom', 'longitudeTo' ], 'number', 'min' => - 180, 'max' => 180 ], [ [ 'latitudeFrom', 'latitudeTo', 'longitudeFrom', 'longitudeTo' ], 'makedouble' ], [ [ 'collectionYearFrom', 'collectionYearTo' ], 'default', 'value' => null ], [ [ 'collectionYearFrom', 'collectionYearTo' ], 'date', 'format' => 'yyyy' ] ] // [['latitudeFrom','latitudeTo'],'isLatitude'], // [['longitudeFrom','longitudeTo'],'isLongitude'], ; } /* * validator for coordinates */ public function makedouble($attribute) { // Yii::info ( "makedouble" ); return $attribute*1.0; } }