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
  • It depends on purpose of existing custom methods inside controller.php:

    For methods which define new views you need to create custom layouts and custom views as well.

    For methods which modify data to be rendered on some specific view you need to implement such transformations in view's js controller. Eventually you can encapsule the logic into a custom field type if the transformations is focused on a single  or few fields.

    For methods which modify data to be fetched or stored into db you need to implement such transformations in view's js controller as well, or eventually on a custom field type.

    Perhaps you can share content of your controller so we can better guide you.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • It depends on purpose of existing custom methods inside controller.php:

    For methods which define new views you need to create custom layouts and custom views as well.

    For methods which modify data to be rendered on some specific view you need to implement such transformations in view's js controller. Eventually you can encapsule the logic into a custom field type if the transformations is focused on a single  or few fields.

    For methods which modify data to be fetched or stored into db you need to implement such transformations in view's js controller as well, or eventually on a custom field type.

    Perhaps you can share content of your controller so we can better guide you.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children
No Data