public function DatabaseFileUsageBackend::__construct

Construct the DatabaseFileUsageBackend.

Parameters

Drupal\Core\Database\Connection $connection: The database connection which will be used to store the file usage information.

string $table: (optional) The table to store file usage info. Defaults to 'file_usage'.

File

drupal/core/modules/file/lib/Drupal/file/FileUsage/DatabaseFileUsageBackend.php, line 42
Definition of Drupal\file\FileUsage\DatabaseFileUsageBackend.

Class

DatabaseFileUsageBackend
Defines the database file usage backend. This is the default Drupal backend.

Namespace

Drupal\file\FileUsage

Code

public function __construct(Connection $connection, $table = 'file_usage') {
  $this->connection = $connection;
  $this->tableName = $table;
}