You are here

public function ChartsApiExample::__construct in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 modules/charts_api_example/src/Controller/ChartsApiExample.php \Drupal\charts_api_example\Controller\ChartsApiExample::__construct()
  2. 8.3 modules/charts_api_example/src/Controller/ChartsApiExample.php \Drupal\charts_api_example\Controller\ChartsApiExample::__construct()

Construct.

Parameters

\Drupal\charts\Services\ChartsSettingsServiceInterface $chartSettings: The charts settings.

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

\Drupal\Component\Uuid\UuidInterface $uuidService: The UUID service.

File

modules/charts_api_example/src/Controller/ChartsApiExample.php, line 47

Class

ChartsApiExample
Charts Api Example.

Namespace

Drupal\charts_api_example\Controller

Code

public function __construct(ChartsSettingsServiceInterface $chartSettings, MessengerInterface $messenger, UuidInterface $uuidService) {
  $this->chartSettings = $chartSettings
    ->getChartsSettings();
  $this->messenger = $messenger;
  $this->uuidService = $uuidService;
}