diff options
Diffstat (limited to 'protected/models')
| -rw-r--r-- | protected/models/Veranstaltung.php | 14 | ||||
| -rw-r--r-- | protected/models/Verein.php | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php index 0117033..60536cf 100644 --- a/protected/models/Veranstaltung.php +++ b/protected/models/Veranstaltung.php @@ -108,8 +108,10 @@ class Veranstaltung extends CActiveRecord $criteria->compare('standort_id',$this->standort_id); $criteria->compare('published',true); + return new CActiveDataProvider($this, array( 'criteria'=>$criteria, + )); } @@ -145,4 +147,16 @@ class Veranstaltung extends CActiveRecord // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior', ); } + public function scopes() + { + return array( + 'published'=>array( + 'condition'=>'published=1', + ), + 'sorted'=>array( + 'order'=>'startzeit ASC', + + ), + ); + } }
\ No newline at end of file diff --git a/protected/models/Verein.php b/protected/models/Verein.php index 78117e0..242bd95 100644 --- a/protected/models/Verein.php +++ b/protected/models/Verein.php @@ -133,4 +133,12 @@ class Verein extends CActiveRecord // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior', ); } + public function scopes() + { + return array( + 'published'=>array( + 'condition'=>'published=1', + ), + ); + } }
\ No newline at end of file |
