function DatabaseFileUsageBackend::__construct
Same name in other branches
- 9 core/modules/file/src/FileUsage/DatabaseFileUsageBackend.php \Drupal\file\FileUsage\DatabaseFileUsageBackend::__construct()
- 8.9.x core/modules/file/src/FileUsage/DatabaseFileUsageBackend.php \Drupal\file\FileUsage\DatabaseFileUsageBackend::__construct()
- 11.x core/modules/file/src/FileUsage/DatabaseFileUsageBackend.php \Drupal\file\FileUsage\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\FileUsageCode
public function __construct(ConfigFactoryInterface $config_factory, Connection $connection, $table = 'file_usage') {
parent::__construct($config_factory);
$this->connection = $connection;
$this->tableName = $table;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.