Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DatabaseFileUsageBackend.php

function DatabaseFileUsageBackend::__construct

Construct the DatabaseFileUsageBackend.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\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'.

Overrides FileUsageBase::__construct

File

core/modules/file/src/FileUsage/DatabaseFileUsageBackend.php, line 39

Class

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

Namespace

Drupal\file\FileUsage

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal