Well i was trying to list the actions permissions that a given user has... it would be easy as do
$role->permissions and loop over it... but when trying to show the actions... it obviously shows the actions of each permission but not the actions the role has.. so i made this (based on the ormacl)
In our app framework, permissions are added automatically by modules, and are linked to language strings to give a localized description of the permission.
We do it in a Viewmodel, which constructs an array ordered by translated actions / permissions, and contains an array with all actions with a true/false to drive the checkboxes in the view. The view just iterates over the array producing this: http://i.imgur.com/ntybs3z.png