public function MongodbFileUsage::__construct in MongoDB 8
Construct the DatabaseFileUsageBackend.
Parameters
\Drupal\mongodb\MongoCollectionFactory $database: The database connection which will be used to store the file usage information.
string $collection: (optional) The collection to store file usage info. Defaults to 'file_usage'.
Overrides FileUsageBase::__construct
File
- src/
MongodbFileUsage.php, line 41 - Definition of Drupal\mongodb\MongodbFileUsage.
Class
- MongodbFileUsage
- Defines the mongodb file usage backend.
Namespace
Drupal\mongodbCode
public function __construct(MongoCollectionFactory $database, $collection = 'file_usage') {
$this->database = $database;
$this->collection = $collection;
}