You are here

protected static function ManagedFile::fileUsage in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::fileUsage()
  2. 10 core/modules/file/src/Element/ManagedFile.php \Drupal\file\Element\ManagedFile::fileUsage()

Wraps the file usage service.

Return value

\Drupal\file\FileUsage\FileUsageInterface

File

core/modules/file/src/Element/ManagedFile.php, line 467

Class

ManagedFile
Provides an AJAX/progress aware widget for uploading and saving a file.

Namespace

Drupal\file\Element

Code

protected static function fileUsage() {
  return \Drupal::service('file.usage');
}