daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     private function get_query_articles_accueil($count) {
  3.         return Doctrine_Query::create()
  4.             ->from('Article as a')
  5.             ->innerJoin('a.section as s')
  6.             ->where('s.section_id =?', array($this->id))
  7.             ->andWhere("a.type = 'article'")
  8.             ->andWhere("a.visibilite IN ('prive', 'public')")
  9.             ->orderBy('date_publication DESC, updated_at DESC')
  10.            
  11.     }
  12.    
  13.     public function count_articles_accueil() {
  14.         return $this->get_query_articles_accueil()->count();
  15.     }
  16.    
  17.     public function get_articles_accueil($count = 2) {
  18.         return $this->get_query_articles_accueil()->limit($count)->execute();
  19.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top