function FileItem::getUploadLocation

Same name and namespace in other branches
  1. 9 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::getUploadLocation()
  2. 8.9.x core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::getUploadLocation()
  3. 10 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::getUploadLocation()

Determines the URI for a file field.

Parameters

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.

See also

\Drupal\Core\Utility\Token::replace()

File

core/modules/file/src/Plugin/Field/FieldType/FileItem.php, line 314

Class

FileItem
Plugin implementation of the 'file' field type.

Namespace

Drupal\file\Plugin\Field\FieldType

Code

public function getUploadLocation($data = []) {
    return static::doGetUploadLocation($this->getSettings(), $data);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.