function layout_discovery_requirements

Same name in other branches
  1. 9 core/modules/layout_discovery/layout_discovery.install \layout_discovery_requirements()
  2. 8.9.x core/modules/layout_discovery/layout_discovery.install \layout_discovery_requirements()
  3. 10 core/modules/layout_discovery/layout_discovery.install \layout_discovery_requirements()

Implements hook_requirements().

File

core/modules/layout_discovery/layout_discovery.install, line 11

Code

function layout_discovery_requirements($phase) {
    $requirements = [];
    if ($phase === 'install') {
        if (\Drupal::moduleHandler()->moduleExists('layout_plugin')) {
            $requirements['layout_discovery'] = [
                'description' => t('Layout Discovery cannot be installed because the Layout Plugin module is installed and incompatible.'),
                'severity' => REQUIREMENT_ERROR,
            ];
        }
    }
    return $requirements;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.