ctools_access_ruleset.module

  1. cis7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  2. cle7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  3. ecd7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  4. elmsmedia7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  5. harmony7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  6. icor7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  7. meedjum_blog7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
  8. mooc7 sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module

ctools_access_ruleset module

This module allows styles to be created and managed on behalf of modules that implement styles.

The ctools_access_ruleset tool allows recolorable styles to be created via a miniature scripting language. Panels utilizes this to allow administrators to add styles directly to any panel display.

Functions

Namesort descending Description
ctools_access_ruleset_ctools_plugin_directory Implementation of hook_ctools_plugin_directory() to let the system know we implement task and task_handler plugins.
ctools_access_ruleset_panels_dashboard_blocks Implementation of hook_panels_dashboard_blocks().
ctools_access_ruleset_permission Implementation of hook_permission()

File

sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * ctools_access_ruleset module
  5. *
  6. * This module allows styles to be created and managed on behalf of modules
  7. * that implement styles.
  8. *
  9. * The ctools_access_ruleset tool allows recolorable styles to be created via a miniature
  10. * scripting language. Panels utilizes this to allow administrators to add
  11. * styles directly to any panel display.
  12. */
  13. /**
  14. * Implementation of hook_permission()
  15. */
  16. function ctools_access_ruleset_permission() {
  17. return array(
  18. 'administer ctools access ruleset' => array(
  19. 'title' => t('Administer access rulesets'),
  20. 'description' => t('Add, delete and edit custom access rulesets.'),
  21. ),
  22. );
  23. }
  24. /**
  25. * Implementation of hook_ctools_plugin_directory() to let the system know
  26. * we implement task and task_handler plugins.
  27. */
  28. function ctools_access_ruleset_ctools_plugin_directory($module, $plugin) {
  29. // Most of this module is implemented as an export ui plugin, and the
  30. // rest is in ctools/includes/ctools_access_ruleset.inc
  31. if ($module == 'ctools' && ($plugin == 'export_ui' || $plugin == 'access')) {
  32. return 'plugins/' . $plugin;
  33. }
  34. }
  35. /**
  36. * Implementation of hook_panels_dashboard_blocks().
  37. *
  38. * Adds page information to the Panels dashboard.
  39. */
  40. function ctools_access_ruleset_panels_dashboard_blocks(&$vars) {
  41. $vars['links']['ctools_access_ruleset'] = array(
  42. 'title' => l(t('Custom ruleset'), 'admin/structure/ctools-rulesets/add'),
  43. 'description' => t('Custom rulesets are combinations of access plugins you can use for access control, selection criteria and pane visibility.'),
  44. );
  45. // Load all mini panels and their displays.
  46. ctools_include('export');
  47. $items = ctools_export_crud_load_all('ctools_access_ruleset');
  48. $count = 0;
  49. $rows = array();
  50. foreach ($items as $item) {
  51. $rows[] = array(
  52. check_plain($item->admin_title),
  53. array(
  54. 'data' => l(t('Edit'), "admin/structure/ctools-rulesets/list/$item->name/edit"),
  55. 'class' => 'links',
  56. ),
  57. );
  58. // Only show 10.
  59. if (++$count >= 10) {
  60. break;
  61. }
  62. }
  63. if ($rows) {
  64. $content = theme('table', array('rows' => $rows, 'attributes' => array('class' => 'panels-manage')));
  65. }
  66. else {
  67. $content = '<p>' . t('There are no custom rulesets.') . '</p>';
  68. }
  69. $vars['blocks']['ctools_access_ruleset'] = array(
  70. 'title' => t('Manage custom rulesets'),
  71. 'link' => l(t('Go to list'), 'admin/structure/ctools-rulesets'),
  72. 'content' => $content,
  73. 'class' => 'dashboard-ruleset',
  74. 'section' => 'right',
  75. );
  76. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.