protected function ProviderPluginBase::getUploadLocation in Video 8
Same name and namespace in other branches
- 8.2 src/ProviderPluginBase.php \Drupal\video\ProviderPluginBase::getUploadLocation()
Determines the URI for a video field.
Parameters
array $settings: The array of field settings.
array $data: An array of token objects to pass to token_replace().
Return value
string An unsanitized file directory URI with tokens replaced. The result of the token replacement is then converted to plain text and returned.
2 calls to ProviderPluginBase::getUploadLocation()
- ProviderPluginBase::downloadThumbnail in src/
ProviderPluginBase.php - Download the remote thumbnail to the local file system.
- ProviderPluginBase::getLocalThumbnailUri in src/
ProviderPluginBase.php - Get the URL to the local thumbnail.
File
- src/
ProviderPluginBase.php, line 156
Class
- ProviderPluginBase
- A base for the provider plugins.
Namespace
Drupal\videoCode
protected function getUploadLocation($data = []) {
$settings = $this
->getVideoSettings();
$destination = trim($settings['file_directory'], '/');
$destination = PlainTextOutput::renderFromHtml(\Drupal::token()
->replace($destination, $data));
return $settings['uri_scheme'] . '://' . $destination;
}