You are here

public function WebformEntityController::addForm in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Controller/WebformEntityController.php \Drupal\webform\Controller\WebformEntityController::addForm()

Returns a webform to add a new submission to a webform.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The current request.

\Drupal\webform\WebformInterface $webform: The webform this submission will be added to.

Return value

array The webform submission webform.

1 string reference to 'WebformEntityController::addForm'
webform.routing.yml in ./webform.routing.yml
webform.routing.yml

File

src/Controller/WebformEntityController.php, line 95

Class

WebformEntityController
Provides route responses for Webform entity.

Namespace

Drupal\webform\Controller

Code

public function addForm(Request $request, WebformInterface $webform) {
  return $webform
    ->getSubmissionForm();
}