function DbtngExampleRepository::__construct

Same name in other branches
  1. 4.0.x modules/dbtng_example/src/DbtngExampleRepository.php \Drupal\dbtng_example\DbtngExampleRepository::__construct()

Construct a repository object.

Parameters

\Drupal\Core\Database\Connection $connection: The database connection.

\Drupal\Core\StringTranslation\TranslationInterface $translation: The translation service.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

File

modules/dbtng_example/src/DbtngExampleRepository.php, line 50

Class

DbtngExampleRepository
Repository for database-related helper methods for our example.

Namespace

Drupal\dbtng_example

Code

public function __construct(Connection $connection, TranslationInterface $translation, MessengerInterface $messenger) {
    $this->connection = $connection;
    $this->setStringTranslation($translation);
    $this->setMessenger($messenger);
}