You are here

page_manager.install in Page Manager 8

Same filename and directory in other branches
  1. 8.4 page_manager.install

Contains update functions for Page Manager.

File

page_manager.install
View source
<?php

/**
 * @file
 * Contains update functions for Page Manager.
 */

/**
 * Implements hook_requirements().
 *
 * @todo: Remove this when https://www.drupal.org/node/2641658 is fixed.
 */
function page_manager_requirements($phase) {
  $requirements = [];

  // Check that core actually is >= 8.0.5.
  if (!version_compare(\Drupal::VERSION, '8.0.5', '>=')) {
    $requirements['page_manager_core_version'] = [
      'title' => t('Page manager Drupal core version'),
      'value' => \Drupal::VERSION,
      'description' => t('Page manager requires at least Drupal core 8.0.5.'),
      'severity' => REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}

/**
 * Install the Page Manager UI for existing sites.
 */
function page_manager_update_8001() {
  \Drupal::service('module_installer')
    ->install([
    'page_manager_ui',
  ]);
}

Functions

Namesort descending Description
page_manager_requirements Implements hook_requirements().
page_manager_update_8001 Install the Page Manager UI for existing sites.