You are here

function panelizer_requirements in Panelizer 7.2

Same name and namespace in other branches
  1. 8.5 panelizer.install \panelizer_requirements()
  2. 6 panelizer.install \panelizer_requirements()
  3. 7.3 panelizer.install \panelizer_requirements()
  4. 7 panelizer.install \panelizer_requirements()

Implements hook_requirements().

File

./panelizer.install, line 10
Install, update and uninstall functions for the panelizer module.

Code

function panelizer_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $node_view = page_manager_get_task('node_view');
    if ($node_view['disabled']) {
      $requirements['panelizer'] = array(
        'title' => t('Panelizer'),
        'value' => t('You must enable the %node_view page template in <a href="@url">page manager</a> to use panelizer.', array(
          '%node_view' => 'node_view',
          '@url' => url('admin/structure/pages'),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}