You are here

public function File::__construct in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/file/src/Plugin/views/field/File.php \Drupal\file\Plugin\views\field\File::__construct()

Constructs a File object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator: The file URL generator.

File

core/modules/file/src/Plugin/views/field/File.php, line 41

Class

File
Field handler to provide simple renderer that allows linking to a file.

Namespace

Drupal\file\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, FileUrlGeneratorInterface $file_url_generator) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->fileUrlGenerator = $file_url_generator;
}