forked from backdrop-contrib/backdrop_upgrade_status
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backdrop_upgrade_status.api.inc
82 lines (77 loc) · 2.29 KB
/
backdrop_upgrade_status.api.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* @file
* API: Hooks provided by this module.
*/
/**
* Returns all content needed for the Backdrop Upgrade Status report.
*
* @param array $$renderable
* The rest of the form.
* @param boolean $todo_status
* Value of the todo checkbox based on the current state of the site.
*
* @return array
* An array containing all the data needed to build a table on the report,
* containing the following keys:
* - machine:
* - title:
* - info:
* - header:
* - rows:
* - empty:
* - collapsed:
* - todo_status:
*/
function hook_backdrop_upgrade_status_report($todo_status = FALSE) {
$return = array(
'machine' => '',
'title' => t('Profile / Distribution'),
'info' => t('This is the profile that was used when the site was first installed.'),
'header' => array(t('Profile name'), t('Enabled'), t('Distribution'), t('Backdrop status'), t('Recommendation')),
'rows' => $profile_rows,
'empty' => '',
'collapsed' => $collapsed,
'todo_status' => $todo_status,
);
return $return;
}
/**
* Implements hook_backdrop_upgrade_status_report_alter().
*
* @param array &$renderable
* The renderable array used as the form on the overview page.
*/
function hook_backdrop_upgrade_status_report_alter(&$renderable) {
// @todo
}
/**
* Implements hook_backdrop_upgrade_status_todo().
*
* @return array
* Todo item info, keyed by machine name. Info contains the following keys.
* - review: Human-readable name of the item to review.
* - description: Description of the item to review.
* - optional: Boolean, TRUE if the item shoudl be labeled as optional.
*/
function hook_backdrop_upgrade_status_todo() {
return array(
'profile' => array(
'review' => 'system profile',
'description' => 'Check that a Backdrop version is available.',
'optional' => TRUE,
),
);
}
/**
* Implements hook_backdrop_upgrade_status_todo_alter().
*
* @param array $todo_items
* Todo item info, keyed by machine name. Info contains the following keys.
* - review: Human-readable name of the item to review.
* - description: Description of the item to review.
* - optional: Boolean, TRUE if the item shoudl be labeled as optional.
*/
function backdrop_upgrade_status_todo_alter(&$todo_items) {
unset($todo_items['profile']);
}