public function MediaFeedsInternetProvider::validate in Media Feeds 7
Same name and namespace in other branches
- 7.2 includes/MediaFeedsInternetProvider.inc \MediaFeedsInternetProvider::validate()
If required, providers can validate the embedCode.
However some providers fail validation, if the file already exists in the media library. That means that validation has to be skipped for existing files. Currently known providers don't do others things in validate(), so skipping should be OK.
Related Issue: When pasting the URL of a file which already exists in the media library, media_internet throws a validation error (http://drupal.org/node/1121808).
Overrides MediaFeedsProvider::validate
File
- includes/
MediaFeedsInternetProvider.inc, line 69 - Provides a wrapper class for media_internet providers.
Class
- MediaFeedsInternetProvider
- Wraps a media_internet provider to implement the interface of MediaFeedsProvider and provide workarounds for some issues. As the issues get fixed the workarounds can be removed.
Code
public function validate() {
if (!$this
->getExistingFile()) {
return $this->provider
->validate();
}
}