You are here

public function Controller::__construct in HubSpot 8

Same name and namespace in other branches
  1. 3.x src/Controller/Controller.php \Drupal\hubspot\Controller\Controller::__construct()

Controller constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The Drupal config factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\hubspot\Hubspot $hubspot: The hubspot api client service.

File

src/Controller/Controller.php, line 49

Class

Controller
Default controller for the hubspot module.

Namespace

Drupal\hubspot\Controller

Code

public function __construct(ConfigFactoryInterface $config_factory, RequestStack $request_stack, Hubspot $hubspot) {
  $this->config = $config_factory
    ->getEditable('hubspot.settings');
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->hubspot = $hubspot;
}