<?php 

class tagComponents extends sfComponents
{
  
  public function executeTagNavigator() {
	
  }
  
  public function executePlayer() {
	$ref = '013002';
  	$film_slug = 'apres-lui';

  	// retrieve infos in database
  	$query = Doctrine_Query::create()
      ->from('ThdFilm F')
      ->leftJoin('F.images I ')
      ->leftJoin('F.videos V')
      ->where("F.ref='{$ref}'");
    $this->film = $query->execute()->getFirst();
	  if (!$this->film) return sfView::NONE;

	  // retrieve video infos
	  $videos = $this->film->getVideos();
	  $this->filmVideo = ($videos) ? $videos[0] : null;

  	return sfView::SUCCESS;
  }

 
}