You are here

function hook_privatemsg_header_info in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.2 privatemsg.api.php \hook_privatemsg_header_info()

Declare headers for message listings.

Return value

An array keyed by an identifier. All header definition keys for theme_table and tablesortort_sql() and the following additional keys:

  • #enabled: TRUE if the header should be enabled by default. FALSE by default.
  • #locked: TRUE if it the header should be locked and can not be enabled or disabled in the user interface.
  • #weight: The default weight which can be changed in the user interface.
  • #title: A title used in the administrative user interface. Defaults to data.
  • #access: Control if the header is accessible, TRUE or FALSE.
  • #theme: Optionally define a theme function for the field. Defaults to 'privatemsg_list_field_$key'.

See also

theme_table

Related topics

3 functions implement hook_privatemsg_header_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

privatemsg_attachments_privatemsg_header_info in privatemsg_attachments/privatemsg_attachments.module
Implements hook_privatemsg_header_info().
privatemsg_filter_privatemsg_header_info in privatemsg_filter/privatemsg_filter.module
Implements hook_privatemsg_header_info().
privatemsg_privatemsg_header_info in ./privatemsg.module
Implements hook_privatemsg_header_info().
1 invocation of hook_privatemsg_header_info()
privatemsg_get_headers in ./privatemsg.module
Returns an array of defined column headers for message listings.

File

./privatemsg.api.php, line 727
Privatemsg API Documentation

Code

function hook_privatemsg_header_info() {
  return array(
    'subject' => array(
      'data' => t('Subject'),
      'field' => 'subject',
      'class' => 'privatemsg-header-subject',
      '#enabled' => TRUE,
      '#locked' => TRUE,
      '#weight' => -20,
    ),
  );
}