You are here

public function AMPService::__construct in Accelerated Mobile Pages (AMP) 8.3

Constructs an AMPService instance.

Parameters

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

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Configuration factory.

\Drupal\amp\Routing\AmpContext $ampContext: AMP context.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

File

src/Service/AMPService.php, line 71

Class

AMPService
Class AMPService.

Namespace

Drupal\amp\Service

Code

public function __construct(MessengerInterface $messenger, ConfigFactoryInterface $configFactory, AmpContext $ampContext, RendererInterface $renderer) {
  $this->messenger = $messenger;
  $this->configFactory = $configFactory;
  $this->ampContext = $ampContext;
  $this->renderer = $renderer;
  $this->ampConfig = $configFactory
    ->get('amp.settings');
  $this->themeConfig = $configFactory
    ->get('amp.theme');
}