function mathjax_requirements in MathJax: LaTeX for Drupal 8.2
Same name and namespace in other branches
- 6 mathjax.install \mathjax_requirements()
- 7.2 mathjax.install \mathjax_requirements()
- 7 mathjax.install \mathjax_requirements()
- 3.0.x mathjax.install \mathjax_requirements()
Implements hook_requirements().
File
- ./
mathjax.install, line 10 - MathJax module install.
Code
function mathjax_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$config = Drupal::config('mathjax.settings');
if (!$config
->get('use_cdn')) {
if (!_mathjax_library_present()) {
$requirements['mathjax_local_libraries'] = array(
'title' => t('MathJax'),
'value' => t('Missing JavaScript libraries'),
'description' => t("MathJax is configured to use local library files but they could not be found. See the README."),
'severity' => REQUIREMENT_ERROR,
);
}
}
}
return $requirements;
}