/** * getselectedvideoAction * @author Dominik Mößlang <*****@*****.**> * @version 1.0 */ public function getselectedvideoAction() { $this->core->logger->debug('core->controllers->VideoController->getselectedvideoAction()'); $strVideoTypeName = ''; $intVideoTypeId = ''; $objSelectedVideo = ''; try { $objRequest = $this->getRequest(); $intChannelId = $objRequest->getParam('channelId'); $strElementId = $objRequest->getParam('elementId'); $strValue = $objRequest->getParam('value'); $strChannelUserId = $objRequest->getParam('channelUserId'); $arrSelectedVideo = array(); switch ($intChannelId) { /** * Vimeo Controller */ case $this->core->sysConfig->video_channels->vimeo->id: require_once GLOBAL_ROOT_PATH . 'library/vimeo/vimeo.class.php'; $intVideoTypeId = 1; $strVideoTypeName = "Vimeo"; /** * Get the selected Video */ if (isset($strValue)) { $objResponse = VimeoVideosRequest::getInfo($strValue); $objSelectedVideo = $objResponse->getVideo(); } break; /** * Youtube Controller */ /** * Youtube Controller */ case $this->core->sysConfig->video_channels->youtube->id: $intVideoTypeId = 2; $strVideoTypeName = "YouTube"; $objResponse = new Zend_Gdata_YouTube(); $objResponse->setMajorProtocolVersion(2); /** * Get the selected Video */ if (isset($strValue)) { $objSelectedVideo = $objResponse->getVideoEntry($strValue); } break; } $this->view->strVideoTypeName = $strVideoTypeName; $this->view->intVideoTypeId = $intVideoTypeId; $this->view->objSelectedVideo = $objSelectedVideo; $this->view->strValue = $strValue; $this->view->strElementId = $strElementId; $this->view->strChannelUserId = $strChannelUserId; } catch (Exception $exc) { $this->core->logger->err($exc); exit; } }