You are here

webform_node_analysis.module in Webform Analysis 8

Webform Analysis - Module.

File

modules/webform_node_analysis/webform_node_analysis.module
View source
<?php

/**
 * @file
 * Webform Analysis - Module.
 */
use Drupal\Core\Entity\EntityInterface;
use Drupal\webform_node_analysis\EntityTypeInfo;

/**
 * Implements hook_entity_type_build().
 */
function webform_node_analysis_entity_type_build(array &$entity_types) {
  return \Drupal::service('class_resolver')
    ->getInstanceFromDefinition(EntityTypeInfo::class)
    ->entityTypeAlter($entity_types);
}

/**
 * Implements hook_entity_operation().
 */
function webform_node_analysis_entity_operation(EntityInterface $entity) {
  return \Drupal::service('class_resolver')
    ->getInstanceFromDefinition(EntityTypeInfo::class)
    ->entityOperation($entity);
}