Providing an abstract output view for modules

Registered by Michael Sebel

We want to provide an abstract class to implement the view parts of sddcms standard modules. Every today view will be altered to use this class. There are basically two abstract methods to be implemented:

abstract getHtml() -> providing the normal html output
abstract getPdf() -> providing a basic string for a pdf output
handleOutput() -> Decides what to output

Of course the "real" output (html or pdf) will be handled by the template class. The handleOuput method listens to the 'pdf' get parameter and thus creates the html or pdf string. The template system will also listen for this and output a pdf by getting the content string into an fpdf extending pdfprint class.

All in all, by implementing this, it will be possible to display multiple module types in one page AND providing pdfs as mentioned in the blueprint pdf-to-html.

Blueprint information

Status:
Complete
Approver:
Michael Sebel
Priority:
Essential
Drafter:
None
Direction:
Approved
Assignee:
Michael Sebel
Definition:
Approved
Series goal:
Accepted for 3.0.0
Implementation:
Implemented
Milestone target:
None
Started by
Michael Sebel
Completed by
Michael Sebel

Related branches

Sprints

Whiteboard

The thing with doing both:

The 'index' File should handle everything:

Is it an old module? If yes, redirect to the regarding view/admin file
Is it a new/rebuilt module? If yes, load the the file as include and instantiate/execute the class it contains
Caching
URL Rewriting

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.