function hook_uc_store_status in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_store/uc_store.api.php \hook_uc_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
array 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.
7 functions implement hook_uc_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_uc_store_status in uc_catalog/
uc_catalog.module - Implements hook_uc_store_status().
- uc_credit_uc_store_status in payment/
uc_credit/ uc_credit.module - Implements hook_uc_store_status().
- uc_file_uc_store_status in uc_file/
uc_file.module - Implements hook_uc_store_status().
- uc_product_uc_store_status in uc_product/
uc_product.module - Implements hook_uc_store_status().
- uc_role_uc_store_status in uc_role/
uc_role.module - Implements hook_uc_store_status().
2 invocations of hook_uc_store_status()
- StoreController::overview in uc_store/
src/ Controller/ StoreController.php - Provide the administration overview page.
- uc_store_requirements in uc_store/
uc_store.install - Implements hook_requirements().
File
- uc_store/
uc_store.api.php, line 71 - Hooks provided by the Store module.
Code
function hook_uc_store_status() {
if ($key = uc_credit_encryption_key()) {
$statuses[] = [
'status' => 'ok',
'title' => t('Credit card encryption'),
'desc' => t('Credit card data in the database is currently being encrypted.'),
];
}
return $statuses;
}