function build_hooks_entity_insert in Build Hooks 8.2
Same name and namespace in other branches
- 3.x build_hooks.module \build_hooks_entity_insert()
Implements hook_entity_insert().
File
- ./
build_hooks.module, line 54 - Contains build_hooks.module.
Code
function build_hooks_entity_insert(EntityInterface $entity) {
if ($entity instanceof ContentEntityInterface) {
if (build_hooks_get_logger_service()
->isEntityTypeLoggable($entity)) {
$triggerService = build_hooks_get_trigger_service();
build_hooks_get_logger_service()
->logEntityCreated($entity);
$triggerService
->deployFrontendEntityUpdateEnvironments();
$triggerService
->invalidateToolbarCacheTag();
}
}
}