You are here

function hook_store_status in Ubercart 6.2

Same name and namespace in other branches
  1. 5 docs/hooks.php \hook_store_status()

Adds status messages to the "Store administration" page.

This hook is used to add items to the store status table on the main store administration screen. Each item gets a row in the table that consists of a status icon, title, and description. These items should be used to give special instructions, notifications, or indicators for components of the cart enabled by the modules. At a glance, a store owner should be able to look here and see if a critical component of your module is not functioning properly.

For example, if the catalog module is installed and it cannot find the catalog taxonomy vocabulary, it will show an error message here to alert the store administrator.

Return value

An array of store status items which are arrays with the following keys:

  • "status": "ok", "warning", or "error" depending on the message.
  • "title" The title of the status message or module that defines it.
  • "desc": The description; can be any message, including links to pages and forms that deal with the issue being reported.
8 functions implement hook_store_status()

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

uc_catalog_store_status in uc_catalog/uc_catalog.module
Implements hook_store_status().
uc_credit_store_status in payment/uc_credit/uc_credit.module
Implements hook_store_status().
uc_file_store_status in uc_file/uc_file.module
Implements hook_store_status().
uc_product_kit_store_status in uc_product_kit/uc_product_kit.module
Implements hook_store_status().
uc_product_store_status in uc_product/uc_product.module
Implements hook_store_status().

... See full list

2 invocations of hook_store_status()
uc_store_admin in uc_store/uc_store.admin.inc
Displays dashboard to other admin pages for the store.
uc_store_requirements in uc_store/uc_store.install
Implements hook_requirements().

File

docs/hooks.php, line 1458
These are the hooks that are invoked by the Ubercart core.

Code

function hook_store_status() {
  if ($key = uc_credit_encryption_key()) {
    $statuses[] = array(
      'status' => 'ok',
      'title' => t('Credit card encryption'),
      'desc' => t('Credit card data in the database is currently being encrypted.'),
    );
  }
  return $statuses;
}