1 common.inc backdrop_common_theme()

Provides theme registration for themes across .inc files.

File

core/includes/common.inc, line 7731
Common functions that many Backdrop modules will need to reference.

Code

function backdrop_common_theme() {
  return array(
    // From theme.inc.
    'page' => array(
      'variables' => array('page' => '', 'page_bottom' => ''),
      'template' => 'templates/page',
    ),
    'header' => array(
      'variables' => array(
        'logo' => NULL,
        'site_name' => NULL,
        'site_slogan' => NULL,
        'menu' => NULL,
      ),
      'template' => 'templates/header',
    ),
    'datetime' => array(
      'variables' => array(
        'timestamp' => NULL,
        'text' => NULL,
        'attributes' => array(),
        'html' => FALSE),
    ),
    'status_messages' => array(
      'variables' => array('display' => NULL, 'messages' => array()),
    ),
    'link' => array(
      'variables' => array(
        'text' => NULL,
        'path' => NULL,
        'options' => array(),
      ),
    ),
    'links' => array(
      'variables' => array(
        'links' => array(),
        'attributes' => array('class' => array('links')),
        'heading' => array(),
      ),
    ),
    'dropbutton_wrapper' => array(
      'variables' => array('children' => NULL),
    ),
    'image' => array(
      // Both a "path" and "uri" are supported for specifying image paths.
      // Path should be used for images relative to Backdrop installation root.
      // URIs should be used for images within the public or private files
      // directories (e.g. public://example.png).
      //
      // HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft
      // allows the alt attribute to be omitted in some cases. Therefore,
      // default the alt attribute to an empty string, but allow code calling
      // theme('image') to pass explicit NULL for it to be omitted. Usually,
      // neither omission nor an empty string satisfies accessibility
      // requirements, so it is strongly encouraged for code calling
      // theme('image') to pass a meaningful value for the alt variable.
      // - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
      // - http://www.w3.org/TR/xhtml1/dtds.html
      // - http://dev.w3.org/html5/spec/Overview.html#alt
      // The title attribute is optional in all cases, so it is omitted by
      // default.
      'variables' => array(
        'uri' => NULL,
        'path' => NULL,
        'width' => NULL,
        'height' => NULL,
        'alt' => '',
        'title' => NULL,
        'attributes' => array(),
      ),
    ),
    'breadcrumb' => array(
      'variables' => array('breadcrumb' => NULL),
    ),
    'help' => array(
      'variables' => array('markup' => NULL),
    ),
    'table' => array(
      'variables' => array(
        'header' => NULL,
        'footer' => NULL,
        'rows' => NULL,
        'attributes' => array(),
        'caption' => NULL,
        'colgroups' => array(),
        'sticky' => TRUE,
        'empty' => '',
      ),
    ),
    'tablesort_indicator' => array(
      'variables' => array('style' => NULL),
    ),
    'mark' => array(
      'variables' => array('type' => MARK_NEW),
    ),
    'item_list' => array(
      'variables' => array(
        'items' => array(),
        'title' => '',
        'type' => 'ul',
        'attributes' => array(),
        'wrapper_attributes' => array(),
        'empty' => NULL,
      ),
    ),
    'more_help_link' => array(
      'variables' => array('url' => NULL),
    ),
    'feed_icon' => array(
      'variables' => array('url' => NULL, 'title' => NULL),
    ),
    'more_link' => array(
      'variables' => array('url' => NULL, 'title' => NULL)
    ),
    'progress_bar' => array(
      'variables' => array('percent' => NULL, 'message' => NULL),
    ),
    'indentation' => array(
      'variables' => array('size' => 1),
    ),
    'head_tag' => array(
      'render element' => 'element',
    ),
    // From theme.maintenance.inc.
    'maintenance_page' => array(
      'variables' => array(
        'content' => NULL,
        'sidebar' => NULL,
        'footer' => NULL,
        'show_messages' => TRUE,
      ),
      'template' => 'templates/maintenance-page',
    ),
    'update_page' => array(
      'variables' => array(
        'content' => NULL,
        'sidebar' => NULL,
        'footer' => NULL,
        'show_messages' => TRUE,
      ),
    ),
    'install_page' => array(
      'variables' => array(
        'content' => NULL,
        'sidebar' => NULL,
        'footer' => NULL,
      ),
    ),
    'task_list' => array(
      'variables' => array('items' => NULL, 'active' => NULL),
    ),
    'authorize_message' => array(
      'variables' => array('message' => NULL, 'success' => TRUE),
    ),
    'authorize_report' => array(
      'variables' => array('messages' => array()),
    ),
    // From pager.inc.
    'pager' => array(
      'variables' => array(
        'tags' => array(),
        'element' => 0,
        'parameters' => array(),
        'quantity' => 9,
      ),
    ),
    'pager_first' => array(
      'variables' => array(
        'text' => NULL,
        'element' => 0,
        'parameters' => array(),
      ),
    ),
    'pager_previous' => array(
      'variables' => array(
        'text' => NULL,
        'element' => 0,
        'interval' => 1,
        'parameters' => array(),
      ),
    ),
    'pager_next' => array(
      'variables' => array(
        'text' => NULL,
        'element' => 0,
        'interval' => 1,
        'parameters' => array(),
      ),
    ),
    'pager_last' => array(
      'variables' => array(
        'text' => NULL,
        'element' => 0,
        'parameters' => array(),
      ),
    ),
    'pager_link' => array(
      'variables' => array(
        'text' => NULL,
        'page_new' => NULL,
        'element' => NULL,
        'parameters' => array(),
        'attributes' => array(),
      ),
    ),
    // From menu.inc.
    'menu_link' => array(
      'render element' => 'element',
    ),
    'menu_tree' => array(
      'render element' => 'tree',
    ),
    'menu_local_task' => array(
      'render element' => 'element',
    ),
    'menu_local_action' => array(
      'render element' => 'element',
    ),
    'menu_local_actions' => array(
      'variables' => array('actions' => array()),
    ),
    'menu_local_tasks' => array(
      'variables' => array('primary' => array(), 'secondary' => array()),
    ),
    'menu_toggle' => array(
      'variables' => array('enabled' => NULL, 'id' => NULL, 'text' => ''),
    ),
    // From form.inc.
    'select' => array(
      'render element' => 'element',
    ),
    'fieldset' => array(
      'render element' => 'element',
    ),
    'radio' => array(
      'render element' => 'element',
    ),
    'date' => array(
      'render element' => 'element',
    ),
    'html_date' => array(
      'render element' => 'element',
    ),
    'html_time' => array(
      'render element' => 'element',
    ),
    'html_datetime' => array(
      'render element' => 'element',
    ),
    'exposed_filters' => array(
      'render element' => 'form',
    ),
    'checkbox' => array(
      'render element' => 'element',
    ),
    'button' => array(
      'render element' => 'element',
    ),
    'image_button' => array(
      'render element' => 'element',
    ),
    'hidden' => array(
      'render element' => 'element',
    ),
    'textfield' => array(
      'render element' => 'element',
    ),
    'tel' => array(
      'render element' => 'element',
    ),
    'email' => array(
      'render element' => 'element',
    ),
    'url' => array(
      'render element' => 'element',
    ),
    'color' => array(
      'render element' => 'element',
    ),
    'number' => array(
      'render element' => 'element',
    ),
    'range' => array(
      'render element' => 'element',
    ),
    'form' => array(
      'render element' => 'element',
    ),
    'textarea' => array(
      'render element' => 'element',
    ),
    'search' => array(
      'render element' => 'element',
    ),
    'password' => array(
      'render element' => 'element',
    ),
    'file' => array(
      'render element' => 'element',
    ),
    'tableselect' => array(
      'render element' => 'element',
    ),
    'form_element' => array(
      'render element' => 'element',
    ),
    'form_required_marker' => array(
      'render element' => 'element',
    ),
    'form_element_label' => array(
      'render element' => 'element',
    ),
    'vertical_tabs' => array(
      'render element' => 'element',
    ),
    'container' => array(
      'render element' => 'element',
    ),
    'details' => array(
      'render element' => 'element',
    ),
  );
}