Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * Retrieves contents of a folder
  *
  * @since   5.0
  * @access  public
  * @param   string
  * @return
  */
 public function folder()
 {
     // Ensure that the user has access
     EB::requireLogin();
     // Get the key to lookup for
     $key = $this->input->getRaw('key');
     // Get the uri
     $uri = EBMM::getUri($key);
     // Generate the html codes for the folder that is being accessed
     $html = EBMM::renderFolder($uri);
     return $this->ajax->resolve($html);
 }