I haven't done this sort of menu and I am not sure I would want to.

You might need to do the following:
Get all controllers by listing the folder (app/controllers) and
pasring the filenames. Dito for any plugins.
You would then have to instantiate each one and call get_ class_
methods() to get all methods and parsing out names like _actionname
and admin_actionname

The above is automatic but quite costly (processing and RAM) so you
would definitely want to cache the results. I go a step further
myself, though.

I have a menu-system that is similar but I have a table containing top-
level menuitems (controllers). This way I have a table of data to
point permissions to. I can link different ones to different users so
that each one sees a slightly different menu... but best of all, I can
completely exclude controllers I don't want a navigation for (such as
an API or some utility-controller). You get a whole lot more control
when you put the data into a table since you can add any meta-data (as
extra fields) you want.

You can do the same using a tree-structure in the database
representing controllers and actions to get the menu you need.

/Martin


On Feb 18, 10:15 am, GetIT <[email protected]> wrote:
> Hi,
>
> I want to build a navigation out of all available Controllers/Actions.
>
> Is there a way to get a list of all Controllers/Actions with the help
> of cakephp or php?
> How?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to