You are here

public function PageContext::__construct in Acquia Lift Connector 8

Same name and namespace in other branches
  1. 8.4 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::__construct()
  2. 8.3 src/Service/Context/PageContext.php \Drupal\acquia_lift\Service\Context\PageContext::__construct()

Constructor.

Parameters

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

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager.

File

src/Service/Context/PageContext.php, line 71
Contains \Drupal\acquia_lift\Service\Context\PageContext.

Class

PageContext

Namespace

Drupal\acquia_lift\Service\Context

Code

public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
  $settings = $config_factory
    ->get('acquia_lift.settings');
  $this->fieldMappings = $settings
    ->get('field_mappings');
  $this->thumbnailConfig = $settings
    ->get('thumbnail');
  $this->taxonomyTermStorage = $entity_type_manager
    ->getStorage('taxonomy_term');
}