use Drupal\Core\Database\Connection;
/**
* The database connection.
*/
protected Connection $database;
/**
* Constructs an object.
*
* @param \Drupal\Core\Database\Connection $database
* The database connection.
*/
public function __construct(Connection $database) {
$this->database = $database;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('database'),
);
}