You are here

function session_cache_file_requirements in Session Cache API 8

Same name and namespace in other branches
  1. 7 session_cache_file/session_cache_file.install \session_cache_file_requirements()

Implements hook_requirements().

File

session_cache_file/session_cache_file.module, line 114
session_cache_file.module

Code

function session_cache_file_requirements($phase) {
  if ($phase != 'runtime') {
    return;
  }
  $requirements['session_cache_file']['title'] = t('Session Cache File cache');
  $session_cache_root = session_cache_file_directory();
  if ($session_cache_root) {
    $requirements['session_cache_file']['value'] = t('Installed at %path', array(
      '%path' => $session_cache_root,
    ));
    $requirements['session_cache_file']['severity'] = REQUIREMENT_OK;
  }
  else {
    $requirements['session_cache_file']['value'] = t('Not set or could not be created. Check directory permissions or re-configure <a href="@url">here</a>.', array(
      '@url' => url('admin/config/media/file-system'),
    ));
    $requirements['session_cache_file']['severity'] = REQUIREMENT_ERROR;
  }
  return $requirements;
}