You are here

function theme_admin_block in Drupal 5

Same name and namespace in other branches
  1. 6 modules/system/system.admin.inc \theme_admin_block()
  2. 7 modules/system/system.admin.inc \theme_admin_block()

This function formats an administrative block for display.

@themeable

Parameters

$block: An array containing information about the block. It should include a 'title', a 'description' and a formatted 'content'.

2 theme calls to theme_admin_block()
theme_admin_page in modules/system/system.module
This function formats an administrative page for viewing.
theme_system_admin_by_module in modules/system/system.module
Theme output of the dashboard page.

File

modules/system/system.module, line 2236
Configuration system that lets administrators modify the workings of the site.

Code

function theme_admin_block($block) {

  // Don't display the block if it has no content to display.
  if (!$block['content']) {
    return '';
  }
  $output = <<<EOT
  <div class="admin-panel">
    <h3>
      {<span class="php-variable">$block</span>[<span class="php-string">'title'</span>]}
    </h3>
    <div class="body">
      <p class="description">
        {<span class="php-variable">$block</span>[<span class="php-string">'description'</span>]}
      </p>
      {<span class="php-variable">$block</span>[<span class="php-string">'content'</span>]}
    </div>
  </div>
EOT;
  return $output;
}