Commit c7e7379d authored by aimai's avatar aimai Committed by Ken Rickard
Browse files

Issue #3272765 by cbeier, aimai: domain_content install fatal error using...

Issue #3272765 by cbeier, aimai: domain_content install fatal error using DomainAccessManagerInterface
parent 0d318118
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
<?php

use Drupal\domain_access\DomainAccessManagerInterface;

/**
 * @file
 * Install, update and uninstall hooks for this module.
 */

// Module files may not be included during install.
require_once __DIR__ . './../domain_access/src/DomainAccessManagerInterface.php';

/**
 * Implements hook_requirements().
 */
@@ -21,12 +22,12 @@ function domain_content_requirements($phase) {
    }
    // Check for required fields.
    foreach ($list as $bundle => $entity_type) {
      $id = $entity_type . '.' . $bundle . '.' . DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD;
      $id = $entity_type . '.' . $bundle . '.' . \Drupal\domain_access\DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD;
      if (!$field = \Drupal::entityTypeManager()->getStorage('field_config')->load($id)) {
        $allow = FALSE;
        break;
      }
      $id = $entity_type . '.' . $bundle . '.' . DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD;
      $id = $entity_type . '.' . $bundle . '.' . \Drupal\domain_access\DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD;
      if (!$field = \Drupal::entityTypeManager()->getStorage('field_config')->load($id)) {
        $allow = FALSE;
        break;