Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityOperations.php

function EntityOperations::entityInsert

Same name in this branch
  1. 11.1.x core/modules/workspaces/src/EntityOperations.php \Drupal\workspaces\EntityOperations::entityInsert()

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity that was just saved.

See also

hook_entity_insert()

File

core/modules/content_moderation/src/EntityOperations.php, line 135

Class

EntityOperations
Defines a class for reacting to entity events.

Namespace

Drupal\content_moderation

Code

public function entityInsert(EntityInterface $entity) {
    if ($this->moderationInfo
        ->isModeratedEntity($entity)) {
        $this->updateOrCreateFromEntity($entity);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal