You are here

function homebox_named_columns in Homebox 6

Same name and namespace in other branches
  1. 6.3 homebox.admin.inc \homebox_named_columns()
  2. 6.2 homebox.admin.inc \homebox_named_columns()
  3. 7.3 homebox.admin.inc \homebox_named_columns()
  4. 7.2 homebox.admin.inc \homebox_named_columns()

Returns a keyed array containing regions/columns named base on Drupal variable homebox_column_count

Return value

A keyed array like array(1 => 'Column 1', 2 => 'Column 2')

2 calls to homebox_named_columns()
homebox_admin_display_form in ./homebox.admin.inc
Generate main blocks administration form.
template_preprocess_homebox_admin_display_form in ./homebox.admin.inc
Process variables for homebox-admin-display.tpl.php.

File

./homebox.admin.inc, line 563
Home box admin file, takes care admin interface for homebox

Code

function homebox_named_columns($pid) {
  $columns = array();
  for ($i = 1; $i <= variable_get('homebox_column_count_' . $pid, 3); $i++) {
    $columns[$i] = t('Column !count', array(
      '!count' => $i,
    ));
  }
  return $columns;
}