/**
  * @return string the Map text display for the current account
  */
 public function getMapText()
 {
     $mapNameRecord = Maps::model()->findByAttributes(array('id' => $this->map_id));
     return $mapNameRecord->name;
 }
 protected function loadMap($mapId)
 {
     //if the project property is null, create it based on input id
     if ($this->_map === null) {
         $this->_map = Maps::model()->findByPk($mapId);
         if ($this->_map === null) {
             throw new CHttpException(404, 'The requested map does not exist.');
         }
     }
     return $this->_map;
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Maps the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Maps::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }