/** * List action for this controller. Displays latest videos * * @param Tx_Youtubeapi_Domain_Model_Video $video The video * @return string */ public function indexAction() { if ($this->settings['channel']) { $videos = $this->videoRepository->getUserUploads($this->settings['channel']); } else { $this->videoRepository->setQuery($this->settings); $queryUrl = $this->videoRepository->getQueryUrl(); $videos = $this->videoRepository->getVideos($query); $this->view->assign('query', $queryUrl); } $this->view->assign('videos', $videos); if ($this->settings['singlePageOnListPage']) { $comments = $this->videoRepository->getComments($videos[0][vid]); $this->view->assign('comments', $comments); $this->response->addAdditionalHeaderData(' <style> .tx-youtubeapi-video-list { float:left; width:50%; padding:0.5em; } .tx-youtubeapi-video-single { padding:0.5em; } .tx-pagebrowse-pi1 { clear: both; } </style>'); } $this->view->assign('settings', $this->settings); }