public function ForwardFormBlock::__construct in Forward 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/Block/ForwardFormBlock.php \Drupal\forward\Plugin\Block\ForwardFormBlock::__construct()
- 8 src/Plugin/Block/ForwardFormBlock.php \Drupal\forward\Plugin\Block\ForwardFormBlock::__construct()
Constructs a new ForwardLinkBlock object.
Parameters
array $configuration: The plugin configuration.
string $plugin_id: The plugin Id.
mixed $plugin_definition: The plugin definition.
\Drupal\forward\ForwardAccessCheckerInterface $access_checker: The Forward access checker interface.
\Drupal\forward\ForwardFormBuilderInterface $form_builder: The Forward form builder interface.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The core configuration factory.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The core route matcher.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ ForwardFormBlock.php, line 80
Class
- ForwardFormBlock
- Provides a block with a Forward form.
Namespace
Drupal\forward\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ForwardAccessCheckerInterface $access_checker, ForwardFormBuilderInterface $form_builder, ConfigFactoryInterface $config_factory, RouteMatchInterface $route_match) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->accessChecker = $access_checker;
$this->formBuilder = $form_builder;
$this->routeMatch = $route_match;
// Force the "form" interface.
$settings = $config_factory
->get('forward.settings')
->get();
$settings['forward_interface_type'] = 'form';
$this->settings = $settings;
}