summaryrefslogtreecommitdiff
path: root/protected/models/Veranstaltung.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/models/Veranstaltung.php')
-rw-r--r--protected/models/Veranstaltung.php14
1 files changed, 14 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