*`options['template']`: Render a twig template directly from the route.
### Observations
* The special parameter `_format` can be used to set the "request format" of the Request object. This is used for such things as setting the Content-Type of the response (e.g. a json format translates into a Content-Type of application/json).
This does _not_ override the `options['format']` nor the `HTTP Accept header` information.
A controller is a PHP function you create that reads information from the Request object and creates and returns a
either a Response object or an array that merges with the route `options` array.
The response could be an HTML page, JSON, XML, a file download, a redirect, a 404 error or anything else.
### HTTP method
```php
/**
*@param Request $request
*@param array $vars Twig Template vars and route options
*/
public function onGet(Request $request, array $vars): array|Response
{
return
}
```
### Forms
```php
public function settings_avatar(Request $request): array
{
$form = Form::create([
['avatar', FileType::class, ['label' => _m('Avatar'), 'help' => _m('You can upload your personal avatar. The maximum file size is 2MB.'), 'multiple' => false, 'required' => false]],
['remove', CheckboxType::class, ['label' => _m('Remove avatar'), 'help' => _m('Remove your avatar and use the default one'), 'required' => false, 'value' => false]],