You are here

public function FileItem::getUploadLocation in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/file/src/Plugin/Field/FieldType/FileItem.php \Drupal\file\Plugin\Field\FieldType\FileItem::getUploadLocation()
  2. 9 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 279

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);
}