BaseEventTypeController is the base controller for modules managing events within OpenEyes.
It implements a standardised design pattern to provide the general CRUD interface for module events. The controller
is designed to be stateful. When an action is called, the state of the controller is determined from the POST and GET
attributes of the request. Properties on the controller are populated through a series of methods, and the response
is rendered based on these values, and returned to the user. The rationale behind this is that each of the methods
provide discrete hooks which can be overridden in module controllers to redefine what the controller properties
should be set to.
The primary property of the controller to be manipulated is the {@link open_elements} which defines the elements of
the event to be displayed in whatever action is being performed.
An abstract class in all but name, it should be used for all event based modules. Specific methods can be implemented
in module level controllers that will be called automatically by this base controller. Specifically setting defaults
on elements and setting complex attributes on individual elements can be handled in specific methods, as defined by
- {@link setElementDefaultOptions}
- {@link setElementComplexAttributesFromData}
- {@link saveElementComplexAttributesFromData}