You are here

public function ContentEntityViewModesExtractor::__construct in Acquia Content Hub 8

Constructs a ContentEntityViewModesExtractor object.

Parameters

\Drupal\Core\Session\AccountProxyInterface $current_user: The current session user.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.

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

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

\Symfony\Component\HttpKernel\HttpKernelInterface $kernel: The Kernel.

\Drupal\Core\Session\AccountSwitcherInterface $account_switcher: The Account Switcher Service.

\Drupal\acquia_contenthub\ContentHubSubscription $contenthub_subscription: The Content Hub Subscription.

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

\Drupal\Core\Block\BlockManagerInterface $block_manager: The Block Manager Interface.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The Request Stack.

File

src/Normalizer/ContentEntityViewModesExtractor.php, line 134

Class

ContentEntityViewModesExtractor
Extracts the rendered view modes from a given ContentEntity Object.

Namespace

Drupal\acquia_contenthub\Normalizer

Code

public function __construct(AccountProxyInterface $current_user, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, HttpKernelInterface $kernel, AccountSwitcherInterface $account_switcher, ContentHubSubscription $contenthub_subscription, ConfigFactoryInterface $config_factory, BlockManagerInterface $block_manager, RequestStack $request_stack) {
  $this->currentUser = $current_user;
  $this->entityDisplayRepository = $entity_display_repository;
  $this->entityTypeManager = $entity_type_manager;
  $this->renderer = $renderer;
  $this->kernel = $kernel;
  $this->accountSwitcher = $account_switcher;
  $this->contentHubSubscription = $contenthub_subscription;
  $this->config = $config_factory;
  $this->renderUser = new ContentHubUserSession($this->config
    ->get('acquia_contenthub.entity_config')
    ->get('user_role'));
  $this->blockManager = $block_manager;
  $this->requestStack = $request_stack;
}