You are here

function theme_mostpopular_admin_blocks_table in Drupal Most Popular 7

1 theme call to theme_mostpopular_admin_blocks_table()
mostpopular_blocks_admin_form in ./mostpopular.blocks.inc
@file Provides an admin GUI for configuring most popular blocks.

File

./mostpopular.blocks.inc, line 207
Provides an admin GUI for configuring most popular blocks.

Code

function theme_mostpopular_admin_blocks_table($vars) {
  $elements = $vars['element'];
  $header = array(
    t('ID'),
    t('Machine Name'),
    t('Title'),
    t('Type'),
    t('Max Results'),
    t('Actions'),
  );
  $rows = array();
  foreach (element_children($elements) as $bid) {
    $block = $elements[$bid];
    unset($block['id']['#title']);
    unset($block['name']['#title']);
    unset($block['title']['#title']);
    unset($block['count']['#title']);
    $row = array(
      'data' => array(
        drupal_render($block['id']),
        drupal_render($block['name']),
        drupal_render($block['title']),
        drupal_render($block['remote']),
        drupal_render($block['count']),
        drupal_render($block),
      ),
    );
    $rows[$bid] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}