thd/apps/frontend/modules/homepage/actions/components.class.php
author Julien Rougeron <julien.rougeron@iri.centrepompidou.fr>
Wed, 05 Sep 2012 12:00:57 +0200
changeset 70 e40bf4dcd708
parent 35 94a1dc255022
permissions -rw-r--r--
test change

<?php 

class homepageComponents extends sfComponents
{
  public function executeLeftPanel() {

  }
  public function executeSearch() {

  }
  public function executeTagList() {
	
  }
  
  public function executeRandomFilm() {
	
  }
  
  public function executeLastTaggedList() {
	$query = Doctrine_Query::create()
      ->from('ThdFilm F')
      ->leftJoin('F.images I ')
      ->leftJoin('F.videos V')
      //->where("cu.code='{$culture}' AND mo.code='{$module}' AND ms.code='{$section}'")
      ->orderBy('F.id DESC')
      ->limit(0,10);
    $this->lastTaggedFilms = $query->execute();
    $this->videoPath = sfConfig::get('app_player_videoPath');
    
  }
  public function executeMostTaggedList() {
	$query = Doctrine_Query::create()
      ->from('ThdFilm F')
      ->leftJoin('F.images I ')
      ->leftJoin('F.videos V')
      //->where("cu.code='{$culture}' AND mo.code='{$module}' AND ms.code='{$section}'")
      ->orderBy('F.ref ASC')
      ->limit(0,10);
    $this->mostTaggedFilms = $query->execute();
    $this->videoPath = sfConfig::get('app_player_videoPath');
  }
}