protected function EntityBrowserFormController::getFormObject in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Controllers/EntityBrowserFormController.php \Drupal\entity_browser\Controllers\EntityBrowserFormController::getFormObject()
Returns the object used to build the form.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
string $form_arg: Either a class name or a service ID.
Return value
\Drupal\Core\Form\FormInterface The form object to use.
Overrides HtmlFormController::getFormObject
File
- src/
Controllers/ EntityBrowserFormController.php, line 83
Class
- EntityBrowserFormController
- Standalone entity browser page.
Namespace
Drupal\entity_browser\ControllersCode
protected function getFormObject(RouteMatchInterface $route_match, $form_arg) {
$browser = $this
->loadBrowser();
if ($original_path = $this->request
->get('original_path')) {
$browser
->addAdditionalWidgetParameters([
'path_parts' => explode('/', $original_path),
]);
}
return $browser
->getFormObject();
}