function ctools_access_ruleset_panels_dashboard_blocks

cis7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)
cle7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)
elmsmedia7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)
icor7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)
meedjum_blog7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)
mooc7 ctools_access_ruleset.module ctools_access_ruleset_panels_dashboard_blocks(&$vars)

Implementation of hook_panels_dashboard_blocks().

Adds page information to the Panels dashboard.

File

sites/all/modules/ulmus/ctools/ctools_access_ruleset/ctools_access_ruleset.module, line 44
ctools_access_ruleset module

Code

function ctools_access_ruleset_panels_dashboard_blocks(&$vars) {
  $vars['links']['ctools_access_ruleset'] = array(
    'title' => l(t('Custom ruleset'), 'admin/structure/ctools-rulesets/add'),
    'description' => t('Custom rulesets are combinations of access plugins you can use for access control, selection criteria and pane visibility.'),
  );

  // Load all mini panels and their displays.
  ctools_include('export');
  $items = ctools_export_crud_load_all('ctools_access_ruleset');
  $count = 0;
  $rows = array();

  foreach ($items as $item) {
    $rows[] = array(
      check_plain($item->admin_title),
      array(
        'data' => l(t('Edit'), "admin/structure/ctools-rulesets/list/$item->name/edit"),
        'class' => 'links',
      ),
    );

    // Only show 10.
    if (++$count >= 10) {
      break;
    }
  }

  if ($rows) {
    $content = theme('table', array('rows' => $rows, 'attributes' => array('class' => 'panels-manage')));
  }
  else {
    $content = '<p>' . t('There are no custom rulesets.') . '</p>';
  }

  $vars['blocks']['ctools_access_ruleset'] = array(
    'title' => t('Manage custom rulesets'),
    'link' => l(t('Go to list'), 'admin/structure/ctools-rulesets'),
    'content' => $content,
    'class' => 'dashboard-ruleset',
    'section' => 'right',
  );
}
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.