function DefaultsEntityForm::__construct
Same name in other branches
- 9 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::__construct()
- 10 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::__construct()
- 11.x core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::__construct()
Constructs a new DefaultsEntityForm.
Parameters
\Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository: The layout tempstore repository.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info service.
File
-
core/
modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php, line 53
Class
- DefaultsEntityForm
- Provides a form containing the Layout Builder UI for defaults.
Namespace
Drupal\layout_builder\FormCode
public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL) {
$this->layoutTempstoreRepository = $layout_tempstore_repository;
if (!$entity_type_bundle_info) {
@trigger_error('The entity_type.bundle.info service must be passed to DefaultsEntityForm::__construct(), it is required before Drupal 9.0.0.', E_USER_DEPRECATED);
$entity_type_bundle_info = \Drupal::service('entity_type.bundle.info');
}
$this->entityTypeBundleInfo = $entity_type_bundle_info;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.