You are here

public function ForwardForm::__construct in Forward 8

Same name in this branch
  1. 8 src/Form/ForwardForm.php \Drupal\forward\Form\ForwardForm::__construct()
  2. 8 src/Plugin/DsField/ForwardForm.php \Drupal\forward\Plugin\DsField\ForwardForm::__construct()
Same name and namespace in other branches
  1. 8.3 src/Plugin/DsField/ForwardForm.php \Drupal\forward\Plugin\DsField\ForwardForm::__construct()
  2. 8.2 src/Plugin/DsField/ForwardForm.php \Drupal\forward\Plugin\DsField\ForwardForm::__construct()

Constructs a Display Suite field plugin.

Parameters

array $configuration:

string $plugin_id:

mixed $plugin_definition:

\Drupal\forward\ForwardAccessCheckerInterface $access_checker:

\Drupal\forward\ForwardFormBuilderInterface $form_builder:

\Drupal\Core\Config\ConfigFactoryInterface; $configFactory:

File

src/Plugin/DsField/ForwardForm.php, line 54

Class

ForwardForm
Forward form plugin.

Namespace

Drupal\forward\Plugin\DsField

Code

public function __construct($configuration, $plugin_id, $plugin_definition, ForwardAccessCheckerInterface $access_checker, ForwardFormBuilderInterface $form_builder, ConfigFactoryInterface $config_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->accessChecker = $access_checker;
  $this->formBuilder = $form_builder;

  // Force the "form" interface
  $settings = $config_factory
    ->get('forward.settings')
    ->get();
  $settings['forward_interface_type'] = 'form';
  $this->settings = $settings;
}