activity.module in Activity 8
Same filename and directory in other branches
Activity file events.
File
activity.moduleView source
<?php
/**
* @file
* Activity file events.
*/
use Drupal\Core\Entity\EntityInterface;
/**
* Implements hook_ENTITY_update().
*/
function activity_entity_update(EntityInterface $entity) {
\Drupal::service('query_activity')
->logActivity($entity, $entity
->getEntityTypeId() . '_update');
}
/**
* Implements hook_ENTITY_insert().
*/
function activity_entity_insert(EntityInterface $entity) {
\Drupal::service('query_activity')
->logActivity($entity, $entity
->getEntityTypeId() . '_insert');
}
/**
* Implements hook_ENTITY_delete().
*/
function activity_entity_delete(EntityInterface $entity) {
\Drupal::service('query_activity')
->logActivity($entity, $entity
->getEntityTypeId() . '_delete');
}
Functions
Name | Description |
---|---|
activity_entity_delete | Implements hook_ENTITY_delete(). |
activity_entity_insert | Implements hook_ENTITY_insert(). |
activity_entity_update | Implements hook_ENTITY_update(). |