protected function getFormObject(RouteMatchInterface
$route_match,
$form_arg) { // If no operation is provided, use 'default'.
$form_arg .= '.default';
[$entity_type_id,
$operation] =
explode('.',
$form_arg);
$form_object =
$this->entityTypeManager->
getFormObject($entity_type_id,
$operation);
// Allow the entity form to determine the entity object from a given route
// match.
$entity =
$form_object->
getEntityFromRouteMatch($route_match,
$entity_type_id);
$form_object->
setEntity($entity);
return $form_object;
}}