public function ViewsMegarowEditController::form in Views Megarow 8
1 string reference to 'ViewsMegarowEditController::form'
File
- src/
Controller/ ViewsMegarowEditController.php, line 13
Class
Namespace
Drupal\views_megarow\ControllerCode
public function form() {
// Extra arguments are in $_REQUEST.
$request = Drupal::service('request_stack');
$current_request = $request
->getCurrentRequest();
$entity_type = $current_request
->get('entity_type');
$entity = $current_request
->get('entity');
$operation = 'edit';
$build = [];
$form = \Drupal::service('entity.manager')
->getFormObject($entity_type, $operation)
->setEntity($entity);
$build[] = \Drupal::formBuilder()
->getForm($form);
return $build;
}