/** * Retrieves the media item * * @since 5.0 * @access public * @param string * @return */ public static function getMedia($uri) { $file = self::getFile($uri); $media = new stdClass(); $media->uri = $uri; $media->meta = EBMM::getFile($uri); $media->file = EBMM::renderFile($uri); $media->info = ''; $media->variations = EBMM::renderVariations($uri); if ($file->type == 'folder') { $media->folder = EBMM::renderFolder($uri); } else { $media->info = EBMM::renderInfo($uri); } return $media; }
/** * Retrieves property about a file or folder * * @since 5.0 * @access public * @param string * @return */ public function info() { $key = $this->input->get('key', '', 'raw'); $uri = EBMM::getUri($key); $mm = EB::mediamanager(); $file = $mm->getItem($uri); $html = EBMM::renderInfo($uri); return $this->ajax->resolve($html, $file); }