protected function FlexiformDisplayPageBase::getPermissionOptions in Flexiform 7
Get Permission Options.
1 call to FlexiformDisplayPageBase::getPermissionOptions()
- FlexiformDisplayPageBase::configForm in includes/
display/ page.display.inc - Get the configuration form.
File
- includes/
display/ page.display.inc, line 156 - Base definition for pages.
Class
- FlexiformDisplayPageBase
- Base class for page displays.
Code
protected function getPermissionOptions() {
$options =& drupal_static('FlexiformDisplayPagePermissionOptions', array());
if (!empty($options)) {
return $options;
}
$module_info = system_get_info('module');
$modules = array();
foreach (module_implements('permission') as $module) {
$modules[$module] = $module_info[$module]['name'];
$permissions[$module] = module_invoke($module, 'permission');
}
foreach ($permissions as $module => $perms) {
foreach ($perms as $perm => $info) {
$options[$modules[$module]][$perm] = strip_tags($info['title']);
}
}
return $options;
}