11:navigation-title: Controller
22
33.. include :: /Includes.rst.txt
4- .. index :: Extbase; View
4+ .. index :: Extbase; Controller
55.. _extbase-controller :
66
77==================
8- Extbase Controller
8+ Extbase controller
99==================
1010
11+ Extbase controllers are the main entry point for handling requests in TYPO3's
12+ Extbase framework. They interpret incoming URLs, map and validate request data,
13+ and delegate tasks to your domain logic through well-structured, object-oriented
14+ code.
15+
16+ Controllers serve as a bridge between the request and the response:
17+
18+ - They call actions based on routing.
19+ - They use `Dependency injection <https://docs.typo3.org/permalink/
20+ t3coreapi:dependency-injection> `_ to access services and repositories.
21+ - They validate input using the `Extbase property mapper <https://docs.typo3.org/
22+ permalink/t3coreapi:extbase-property-mapping> `_ and optionally apply
23+ additional validation rules via
24+ `Using validation for Extbase models and controllers <https://docs.typo3.org/
25+ permalink/t3coreapi:extbase-validation> `_.
26+ - They prepare and assign data to the
27+ `Extbase view <https://docs.typo3.org/permalink/t3coreapi:extbase-view >`_.
28+ - They return the final response – typically rendered with
29+ `Fluid <https://docs.typo3.org/permalink/t3coreapi:fluid >`_ templates.
30+
31+ Error handling is built-in via a dedicated
32+ `Error action <https://docs.typo3.org/permalink/t3coreapi:extbase-error-action >`_,
33+ ensuring robust and predictable behavior in case something goes wrong.
34+
35+ To make a controller callable, it must be registered in a plugin configuration.
36+ This tells TYPO3 which controller and actions are available in which context.
37+
38+ See `Extbase plugins <https://docs.typo3.org/permalink/t3coreapi:plugins-extbase >`_
39+ for details.
40+
1141**Contents: **
1242
1343.. toctree ::
@@ -18,3 +48,7 @@ Extbase Controller
1848 ErrorAction
1949 PropertyMapping
2050 TypeConverter
51+
52+ .. seealso ::
53+ If you are using the :composer: `stefanfroemken/ext-kickstarter ` you can use
54+ command `vendor/bin/typo3 make:controller ` to generate a controller.
0 commit comments