/**
  * Generate module
  */
 protected function compile()
 {
     $objVideo = new VideoBoxElement((int) $this->videobox_video);
     $this->Template->element = $objVideo->generate();
     $this->Template->description = $this->videobox_description;
     $this->Template->float = in_array($this->videobox_floating, array('left', 'right')) ? sprintf(' float:%s;', $this->videobox_floating) : '';
 }
    /**
     * Compile Videos for the backend view
     * @param array
     * @return string
     */
    public function compileVideos($arrRow)
    {
        $objVideo = new VideoBoxElement((int) $arrRow['id']);
        return '
		<div class="cte_type"><strong>' . $arrRow['videotitle'] . '</strong></div>
		<div class="limit_height' . (!$GLOBALS['TL_CONFIG']['doNotCollapse'] ? ' h64' : '') . ' block">
		' . $objVideo->generate() . '
		</div>' . "\n";
    }
 /**
  * Prepare video template data
  * @param int video id
  * @param int jumpTo page
  * @return array
  */
 public function prepareVideoTemplateData($intVideoId, $intJumpTo = false)
 {
     $arrReturn = array();
     $objVideo = new VideoBoxElement($intVideoId);
     $arrReturn['video'] = $objVideo->generate();
     $arrReturn['videoData'] = $objVideo->getData();
     $arrReturn['title'] = $objVideo->videotitle;
     if ($intJumpTo) {
         // jumpTo gets cached automatically
         $objJumpTo = $this->Database->prepare('SELECT id,alias FROM tl_page WHERE id=?')->execute($intJumpTo);
         $arrReturn['href'] = ampersand($this->generateFrontendUrl($objJumpTo->row(), '/video/' . (!$GLOBALS['TL_CONFIG']['disableAlias'] && $objVideo->alias != '' ? $objVideo->alias : $objVideo->videoid)));
     }
     // thumb
     if ($objVideo->thumb) {
         $objImgData = new stdClass();
         $arrItem = array_merge($arrReturn['videoData'], array('singleSRC' => $objVideo->thumb));
         $this->addImageToTemplate($objImgData, $arrItem);
         $arrReturn['imgData'] = $objImgData;
     }
     return $arrReturn;
 }