Listing Handler

- added a Listing Handler class to take care of listing params
- added status column to Subscriber
- added specific methods to both Newsletter & Subscriber models for listing
This commit is contained in:
Jonathan Labreuille
2015-09-02 14:47:18 +02:00
parent 12a664f44e
commit 3fe895a7fe
7 changed files with 153 additions and 120 deletions

View File

@@ -18,4 +18,21 @@ class Newsletter extends Model {
'isString' => 'body_is_not_string'
));
}
static function search($orm, $search = '') {
return $orm->where_like('subject', '%'.$search.'%');
}
static function groups() {
return array(
array(
'name' => 'all',
'label' => __('All'),
'count' => Newsletter::count()
)
);
}
static function group($orm, $group = null) {
}
}