You are here

function domain_access_node_type_insert in Domain Access 8

Implements hook_ENTITY_TYPE_insert().

Creates our fields when new node types are created.

File

domain_access/domain_access.module, line 489
Domain-based access control for content.

Code

function domain_access_node_type_insert(EntityInterface $entity) {

  /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
  if (!$entity
    ->isSyncing()) {

    // Do not fire hook when config sync in progress.
    domain_access_confirm_fields('node', $entity
      ->id());
  }
}