public function ContactBlock::__construct in Contact Block 8
Constructor for ContactBlock block class.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
string $plugin_definition: The plugin implementation definition.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Entity\EntityFormBuilderInterface $entity_form_builder: The entity form builder.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Routing\CurrentRouteMatch $route_match: The route match service.
\Drupal\contact\Access\ContactPageAccess $check_contact_page_access: Check the access of personal contact.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ ContactBlock.php, line 100
Class
- ContactBlock
- Provides a 'ContactBlock' block.
Namespace
Drupal\contact_block\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory, EntityFormBuilderInterface $entity_form_builder, RendererInterface $renderer, CurrentRouteMatch $route_match, ContactPageAccess $check_contact_page_access) {
$this->entityTypeManager = $entity_type_manager;
$this->configFactory = $config_factory;
$this->entityFormBuilder = $entity_form_builder;
$this->renderer = $renderer;
$this->routeMatch = $route_match;
$this->checkContactPageAccess = $check_contact_page_access;
parent::__construct($configuration, $plugin_id, $plugin_definition);
}