function panels_requirements_runtime in Panels 6.3
Check runtime requirements (status report).
File
- ./
panels.install, line 47
Code
function panels_requirements_runtime() {
$requirements = array();
$legacy = panels_get_legacy_state();
$t = get_t();
$state = $legacy
->getStatus();
if (empty($state)) {
$requirements['panels_legacy'] = array(
'title' => $t('Panels operating normally'),
'value' => NULL,
'severity' => REQUIREMENT_OK,
'description' => $t('Panels is operating normally - no out-of-date plugins or modules are forcing it into legacy mode'),
);
}
else {
$description = $t("Panels is operating in Legacy mode due to the following issues:\n");
// Add the reasons why Panels is acting in legacy mode.
$list = array();
foreach ($state as $values) {
$modules = array();
foreach ($values['modules'] as $module => $type) {
$modules[] = array(
'data' => check_plain($module) . ' - ' . $type,
);
}
$list[] = array(
'data' => $values['explanation'] . "\n" . theme('item_list', $modules),
);
}
$description .= theme('item_list', $list);
$requirements['panels_legacy'] = array(
'title' => $t('Panels operating in Legacy mode'),
'value' => NULL,
'severity' => REQUIREMENT_WARNING,
'description' => $description,
);
}
return $requirements;
}