RelationManager Attach and Detach possible values

I have RoleResource, with a PermissionRelationManager.
  1. I'd like to have the table in RelationManager show all possible Permissions to attach to the role, whether attached or not, instead of just those currently attached.
  2. I need to be able to programmatically determine whether it's attached or not, so I can conditionally show the Attach or Detach button.
If it helps, I have an array called $permissions which contains all the permission methods defined in each Policy that I can use, I'm just not sure how/where to bind that into the table or if that's not the right way of doing it, how to adjust to show all possible with an idea of whether they're Attached or not. Cheers!
Was this page helpful?