public function ForwardController::buildForm in Forward 8
Same name and namespace in other branches
- 8.3 src/Controller/ForwardController.php \Drupal\forward\Controller\ForwardController::buildForm()
- 8.2 src/Controller/ForwardController.php \Drupal\forward\Controller\ForwardController::buildForm()
Build a Forward form when accessed as a separate page through the router.
Parameters
EntityInterface $entity: The entity being forwarded.
Return value
array The render array for the form.
1 string reference to 'ForwardController::buildForm'
File
- src/
Controller/ ForwardController.php, line 51
Class
- ForwardController
- Returns responses for the Forward module.
Namespace
Drupal\forward\ControllerCode
public function buildForm(EntityInterface $entity) {
// Force the "link" interface so the Forward form page doesn't build inside a fieldset
$settings = $this
->config('forward.settings')
->get();
$settings['forward_interface_type'] = 'link';
return $this->formBuilder
->buildForwardEntityForm($entity, $settings);
}