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

Breadcrumb

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

function EntityOperations::shouldSkipOperations

Determines whether we need to react on entity operations.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check.

Return value

bool Returns TRUE if entity operations should not be altered, FALSE otherwise.

5 calls to EntityOperations::shouldSkipOperations()
EntityOperations::entityInsert in core/modules/workspaces/src/EntityOperations.php
Responds to the creation of a new entity.
EntityOperations::entityPredelete in core/modules/workspaces/src/EntityOperations.php
Acts on an entity before it is deleted.
EntityOperations::entityPresave in core/modules/workspaces/src/EntityOperations.php
Acts on an entity before it is created or updated.
EntityOperations::entityTranslationInsert in core/modules/workspaces/src/EntityOperations.php
Acts after an entity translation has been added.
EntityOperations::entityUpdate in core/modules/workspaces/src/EntityOperations.php
Responds to updates to an entity.

File

core/modules/workspaces/src/EntityOperations.php, line 353

Class

EntityOperations
Defines a class for reacting to entity events.

Namespace

Drupal\workspaces

Code

protected function shouldSkipOperations(EntityInterface $entity) {
    // We should not react on entity operations when the entity is ignored or
    // when we're not in a workspace context.
    return $this->workspaceInfo
        ->isEntityIgnored($entity) || !$this->workspaceManager
        ->hasActiveWorkspace();
}

API Navigation

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