4 Years
Discussion Span
Last Post by EvolutionFallen

I like to think of Components as non-member functions for CakePHP Controllers. If you want to reuse certain functions or blocks of code in multiple controllers, you can create a component and add it to all the controllers you want it in. For example, Cake has a component for Sessions which allows you to access session info and functions in different controllers. See Components for more info.

Helpers are like Components, but they help you with your presentation layer (your Views). For example, FormHelper makes it easy to create HTML forms based on your database table schema. HtmlHelper can make it easy to print out HTML elements (like links or lists). See Helpers for more info.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.