function uc_file_uc_store_status in Ubercart 8.4
Same name and namespace in other branches
- 7.3 uc_file/uc_file.module \uc_file_uc_store_status()
Implements hook_uc_store_status().
File
- uc_file/
uc_file.module, line 206 - Allows products to be associated with downloadable files.
Code
function uc_file_uc_store_status() {
$file_config = \Drupal::config('uc_file.settings');
$message = [];
if (!is_dir($file_config
->get('base_dir'))) {
$message[] = [
'status' => 'warning',
'title' => t('File downloads'),
'desc' => t('The file downloads directory is not valid or set. Set a valid directory in the <a href=":url">product settings</a> under the file download settings tab.', [
':url' => Url::fromRoute('uc_product.settings')
->toString(),
]),
];
}
else {
$message[] = [
'status' => 'ok',
'title' => t('File downloads'),
'desc' => t('The file downloads directory has been set and is working.'),
];
}
return $message;
}