CHAPTER 11Components and Utilities

Cake uses helpers to extend the functionality of views. By placing several view functions in helpers, not only do your views remain light but the application is better organized. There is no precise method for how to organize functions in a helper other than keeping order and maintaining consistency in the application. Helpers are to the view what components and utilities are to the controller. In a way, you could think of components as "controller helpers."

Why Use Components?

But you may ask, why have components when there's an App controller? Shouldn't the App controller hold all the functions used by multiple controllers? Yes and no. The App controller does hold more generalized actions, or actions that ...

Get Beginning CakePHP: From Novice to Professional now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.