function MediaVimeoStreamWrapper::getLocalThumbnailPath in Media: Vimeo 7
Same name and namespace in other branches
- 7.2 includes/MediaVimeoStreamWrapper.inc \MediaVimeoStreamWrapper::getLocalThumbnailPath()
File
- includes/
MediaVimeoStreamWrapper.inc, line 44 - Create a Vimeo Stream Wrapper class for the Media/Resource module.
Class
- MediaVimeoStreamWrapper
- Create an instance like this: $vimeo = new ResourceVimeoStreamWrapper('vimeo://v/[video-code]');
Code
function getLocalThumbnailPath() {
$local_path = 'public://media-vimeo/' . intval($this->parameters['v']) . '.jpg';
if (!file_exists($local_path)) {
$dirname = drupal_dirname($local_path);
file_prepare_directory($dirname, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
@copy($this
->getOriginalThumbnailPath(), $local_path);
}
return $local_path;
}