You are here

public function ForwardForm::build in Forward 8.2

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

File

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

Class

ForwardForm
Forward form plugin.

Namespace

Drupal\forward\Plugin\DsField

Code

public function build() {
  $render_array = [];

  // Build the form unless Forward is rendering an email.
  $config = $this
    ->getConfiguration();
  if (empty($config['build']['#forward_build'])) {
    $render_array = $this->formBuilder
      ->buildForwardEntityForm($this
      ->entity(), $this->settings);
  }
  return $render_array;
}