What should be used to replace controller.php?

I am upgrading some older modules that currently run in BWC.  I need to replace some actions that are currently in controller.php, How I  do that so they no longer have to run in BWC?

Thank You,

Amy

Parents
  • controller_examples.zip

    Here is an example of the contoller.php  note there are actions, pre_edit and pre_detail.

    I thought about putting the actions as entryPoints, but I figured there was something better.

  • Definitely the code inside pre_detailview and pre_editview can be turned into a regular sugarLogic Formula.

    Methods createHeader and printHTML can be turned into some hbs files and js controllers for custom layouts billable and history.

    Methods action_printBillable, action_printHistory, action_getBillable, action_getHistory can be turned into new layouts/views billable and history.

    Methods action_pdfExport, createTask, page1, page2 can be converted into a custom SugarPdf class, which is OOTB invoked by regular Print PDF.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Definitely the code inside pre_detailview and pre_editview can be turned into a regular sugarLogic Formula.

    Methods createHeader and printHTML can be turned into some hbs files and js controllers for custom layouts billable and history.

    Methods action_printBillable, action_printHistory, action_getBillable, action_getHistory can be turned into new layouts/views billable and history.

    Methods action_pdfExport, createTask, page1, page2 can be converted into a custom SugarPdf class, which is OOTB invoked by regular Print PDF.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children