Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- private function get_query_articles_accueil($count) {
- return Doctrine_Query::create()
- ->from('Article as a')
- ->innerJoin('a.section as s')
- ->where('s.section_id =?', array($this->id))
- ->andWhere("a.type = 'article'")
- ->andWhere("a.visibilite IN ('prive', 'public')")
- ->orderBy('date_publication DESC, updated_at DESC')
- }
- public function count_articles_accueil() {
- return $this->get_query_articles_accueil()->count();
- }
- public function get_articles_accueil($count = 2) {
- return $this->get_query_articles_accueil()->limit($count)->execute();
- }
Add Comment
Please, Sign In to add comment