/** * Extend the parent method * @return string */ public function generate() { if ($this->playerSRC == '') { return ''; } $source = deserialize($this->playerSRC); if (!is_array($source) || empty($source)) { return ''; } $objFiles = \FilesModel::findMultipleByIdsAndExtensions($source, array('mp4', 'm4v', 'mov', 'wmv', 'webm', 'ogv', 'm4a', 'mp3', 'wma', 'mpeg', 'wav')); if ($objFiles === null) { return ''; } // Display a list of files in the back end if (TL_MODE == 'BE') { $return = '<ul>'; while ($objFiles->next()) { $objFile = new \File($objFiles->path); $return .= '<li><img src="system/themes/' . $this->getTheme() . '/images/' . $objFile->icon . '" width="18" height="18" alt="" class="mime_icon"> <span>' . $objFile->name . '</span> <span class="size">(' . $this->getReadableSize($objFile->size) . ')</span></li>'; } return $return . '</ul>'; } $this->objFiles = $objFiles; return parent::generate(); }