Thursday, October 2, 2014

Get aco path/fragments from url

Hi

I have modified/extended the Html->link() helper method to check if an acl permission is set or not (to return the link or null from the link() method).

This works nicely with Router::parse and Inflector::camelize if the url-string (or array) follows cake naming convention. But unfortunatley if there is a custom route set, the parse method returns the fragments of the aliases of course.

How do I get the "real" controller/plugin/action names from a url (string or array) given?

Thanks,
Frank

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: