Skip to content

Commit 1031c5e

Browse files
committed
Development: add controller class structure
1 parent 4aa84dd commit 1031c5e

File tree

3 files changed

+415
-1
lines changed

3 files changed

+415
-1
lines changed

source/development/frontend/controller.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,20 @@ classes to ensure basic functionality such as authorisation and CSRF
1313
protection.
1414

1515
Controllers are placed in the directory /usr/local/opnsense/mvc/app/controllers/<Vendor\_name>/<Module\_name>/
16-
and should use the folloging naming conventions, suffix Controller.php on
16+
and should use the following naming conventions, suffix Controller.php on
1717
every class file and suffix Action on all action methods.
1818

19+
----------------------
20+
Class structure
21+
----------------------
22+
23+
Most components inherit from a set of standard controllers, which are specified in the diagram below including their primary
24+
usage scope (/ui or /api)
25+
26+
27+
.. image:: ../images/Controller_class_hierarchy.svg
28+
:width: 100%
29+
1930

2031
----------------------
2132
View based controllers

0 commit comments

Comments
 (0)