true), array('encuesta', 'length', 'max'=>150), array('autor, enlace_original, otros', 'length', 'max'=>255), array('alcance, citacion, licencia_uso, resumen, fecha, log', 'safe'), array('tabla', 'length', 'max'=>100), // The following rule is used by search(). // Please remove those attributes that should not be searched. array('id_encuesta_base, encuesta, autor, alcance, citacion, licencia_uso, enlace_original, resumen, fecha, otros, graficable, descargable, activo', 'safe', 'on'=>'search'), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( 'basesArchivoses' => array(self::HAS_MANY, 'BasesArchivos', 'id_base_encuesta'), 'basesCategoriases' => array(self::HAS_MANY, 'BasesCategorias', 'id_base_encuesta'), 'basesPreguntases' => array(self::HAS_MANY, 'BasesPreguntas', 'id_base_encuesta'), 'basesAutores' => array(self::HAS_MANY, 'BasesAutores', 'id_base_encuesta'), ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'id_encuesta_base' => 'Id Encuesta Base', 'encuesta' => 'Encuesta', 'autor' => 'Autor', 'alcance' => 'Alcance', 'citacion' => 'Citacion', 'licencia_uso' => 'Licencia Uso', 'enlace_original' => 'Enlace Original', 'resumen' => 'Resumen', 'fecha' => 'Fecha', 'otros' => 'Otros', 'descargable' => 'Descargable', 'graficable' => 'graficable', 'activo' => 'Activo', 'vistas' => 'Vistas', 'log' => 'Log', ); } /** * Retrieves a list of models based on the current search/filter conditions. * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. */ public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id_encuesta_base',$this->id_encuesta_base); $criteria->compare('encuesta',$this->encuesta,true); $criteria->compare('autor',$this->autor,true); $criteria->compare('alcance',$this->alcance,true); $criteria->compare('citacion',$this->citacion,true); $criteria->compare('licencia_uso',$this->licencia_uso,true); $criteria->compare('enlace_original',$this->enlace_original,true); $criteria->compare('resumen',$this->resumen,true); $criteria->compare('fecha',$this->fecha,true); $criteria->compare('otros',$this->otros,true); $criteria->compare('descargable',$this->descargable); $criteria->compare('activo',$this->activo); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); } }