Controller and descendants
All controllers are singletons, retrieved via getInstance
. They are handled mainly using the methods on[SomeEventName]
, called to register an event. All such methods have its own implementations. But generally their algorithm looks as follows:
- Create a required timeline record using [link=13963230]TimelineEntry[/link];
- If required, prepare data for showing the event at the frontend ([link=13963124]HistoryDataModel[/link]);
- Send push event.
FactoryBasedController
FactoryBasedController - timeline controller for new entities.
CRM entities are gradually re-written for use of [link=13972404]new API[/link]. You need to prepare support for new approach to operation in various locations. Timeline is not an exception.
Due to this, abstract class was created \Bitrix\Crm\Timeline\FactoryBasedController
. It's base for all timeline controllers for entities, operating, based on [link=13981986]factory[/link]. This class provides maximum universal implementation for event registering feature in timeline.