public function MediaInternetFlickrHandler::getFileObject in Media: Flickr 7.2
Same name and namespace in other branches
- 7 includes/MediaInternetFlickrHandler.inc \MediaInternetFlickrHandler::getFileObject()
File
- includes/
MediaInternetFlickrHandler.inc, line 24 - Extends the MediaInternetBaseHandler class to handle Flickr images.
Class
- MediaInternetFlickrHandler
- Implementation of MediaInternetBaseHandler.
Code
public function getFileObject() {
$uri = $this
->parse($this->embedCode);
$file = file_uri_to_object($uri, TRUE);
// Try to default the file name to the image's title.
if (empty($file->fid) && ($info = $this
->getOEmbed())) {
$file->filename = truncate_utf8($info['title'], 255);
}
return $file;
}