diff options
Diffstat (limited to 'protected/models/Standort.php')
| -rw-r--r-- | protected/models/Standort.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protected/models/Standort.php b/protected/models/Standort.php index cd4f284..48493f6 100644 --- a/protected/models/Standort.php +++ b/protected/models/Standort.php @@ -22,6 +22,11 @@ class Standort extends CActiveRecord return parent::model($className); } + public function afterConstruct() { + $this->pos_lat = Yii::app()->params['pos_lat']; + $this->pos_long = Yii::app()->params['pos_long']; + } + /** * @return string the associated database table name */ @@ -38,6 +43,7 @@ class Standort extends CActiveRecord // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( + array('name, pos_lat, pos_long', 'required'), array('published', 'numerical', 'integerOnly'=>true), array('pos_lat, pos_long', 'numerical'), array('name', 'length', 'max'=>80), @@ -68,7 +74,7 @@ class Standort extends CActiveRecord 'name' => 'Name', 'pos_lat' => 'Pos Lat', 'pos_long' => 'Pos Long', - 'published' => 'Published', + 'published' => 'Öffentlich', ); } |
