Hi all,
I am working on an extension for the management of courses (e.g. for a gym).
There are several custom entities, one of them is CourseManagerCourse another is CourseManagerRegistration.
The second has a belongsTo link to the first.
I have a not-storable, read-only field in CourseManagerRegistration which calculates a registration code. At the moment, I implemented it as a Espo\Core\FieldProcessing\Loader (registered in recordDefs as listLoader and readLoader).
Everything works well so far except in PDF templates. There, the fields are not populated when the registrations are loaded from inside a Course.
And here comes my question: As I see it, the population of the field could also be implemented by extending the Entity class and override the get method. Or I could use the pdfDefs and implement a PdfDataLoader. Perhaps Hooks would also be an option?
What is the best way to go here?
Thanks in advance for your answers :-)
Ingo
I am working on an extension for the management of courses (e.g. for a gym).
There are several custom entities, one of them is CourseManagerCourse another is CourseManagerRegistration.
The second has a belongsTo link to the first.
I have a not-storable, read-only field in CourseManagerRegistration which calculates a registration code. At the moment, I implemented it as a Espo\Core\FieldProcessing\Loader (registered in recordDefs as listLoader and readLoader).
Everything works well so far except in PDF templates. There, the fields are not populated when the registrations are loaded from inside a Course.
And here comes my question: As I see it, the population of the field could also be implemented by extending the Entity class and override the get method. Or I could use the pdfDefs and implement a PdfDataLoader. Perhaps Hooks would also be an option?
What is the best way to go here?
Thanks in advance for your answers :-)
Ingo

Comment