function hook_store_status in Ubercart 5
Same name and namespace in other branches
- 6.2 docs/hooks.php \hook_store_status()
Add 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 tore 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.
7 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 - Implementation of Übercart's hook_store_status().
- uc_credit_store_status in payment/
uc_credit/ uc_credit.module - Implementation of hook_store_status().
- uc_file_store_status in uc_file/
uc_file.module - Implementation of hook_store_status().
- uc_product_kit_store_status in uc_product_kit/
uc_product_kit.module - uc_product_store_status in uc_product/
uc_product.module - Display the status of the product image handlers.
1 invocation of hook_store_status()
- uc_store_admin in uc_store/
uc_store.module
File
- docs/
hooks.php, line 1041 - These are the hooks that are invoked by the Übercart 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;
}