You are here

public function DashboardViewBuilder::__construct in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/DashboardViewBuilder.php \Drupal\dashboards\Entity\DashboardViewBuilder::__construct()

Constructs a new EntityViewBuilder.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Theme\Registry $theme_registry: The theme registry.

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

\Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface $section_storage_manager: Section storage handler.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler interface.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Module config factory interface.

Overrides EntityViewBuilder::__construct

File

src/Entity/DashboardViewBuilder.php, line 67

Class

DashboardViewBuilder
Dashboard Entity ViewBuilder.

Namespace

Drupal\dashboards\Entity

Code

public function __construct(EntityTypeInterface $entity_type, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager, Registry $theme_registry = NULL, EntityDisplayRepositoryInterface $entity_display_repository = NULL, SectionStorageManagerInterface $section_storage_manager, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) {
  parent::__construct($entity_type, $entity_repository, $language_manager, $theme_registry, $entity_display_repository);
  $this->sectionStorageManager = $section_storage_manager;
  $this->moduleHandler = $module_handler;
  $this->config = $config_factory
    ->get('dashboards.settings');
}