summaryrefslogtreecommitdiff
path: root/protected/models/Standort.php
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-04-30 10:18:11 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-04-30 10:18:11 +0200
commitacec2b5dc35302147f9a9c73d837dce2f3f9958e (patch)
tree2f88a3a657a9211331e1e63e056a089189bd0dd2 /protected/models/Standort.php
parent56593a21209f3ce55fe66d303dbe01b8e081778b (diff)
parent148a216bba21cec1cbe07b60b5191791e0016d6f (diff)
Merge branch 'master' of ssh://proxy.ccwn.org:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/models/Standort.php')
-rw-r--r--protected/models/Standort.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/protected/models/Standort.php b/protected/models/Standort.php
index 48493f6..d62a594 100644
--- a/protected/models/Standort.php
+++ b/protected/models/Standort.php
@@ -5,6 +5,7 @@
*
* The followings are the available columns in table 'standort':
* @property integer $id
+ * @property string $type
* @property string $name
* @property double $pos_lat
* @property double $pos_long
@@ -32,7 +33,7 @@ class Standort extends CActiveRecord
*/
public function tableName()
{
- return 'standort';
+ return 'standorte';
}
/**
@@ -43,13 +44,14 @@ 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('name, pos_lat, pos_long, type', 'required'),
array('published', 'numerical', 'integerOnly'=>true),
array('pos_lat, pos_long', 'numerical'),
+ array('type', 'length', 'max'=>6),
array('name', 'length', 'max'=>80),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
- array('id, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'),
+ array('id, type, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'),
);
}
@@ -71,6 +73,7 @@ class Standort extends CActiveRecord
{
return array(
'id' => 'ID',
+ 'type' => 'Typ',
'name' => 'Name',
'pos_lat' => 'Pos Lat',
'pos_long' => 'Pos Long',
@@ -90,6 +93,7 @@ class Standort extends CActiveRecord
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
+ $criteria->compare('type',$this->type,true);
$criteria->compare('name',$this->name,true);
$criteria->compare('pos_lat',$this->pos_lat);
$criteria->compare('pos_long',$this->pos_long);
@@ -99,4 +103,10 @@ class Standort extends CActiveRecord
'criteria'=>$criteria,
));
}
+
+ public function behaviors() {
+ return array(
+ 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ );
+ }
} \ No newline at end of file