function WorkspaceInformation::isEntityIgnored

Same name in other branches
  1. 11.x core/modules/workspaces/src/WorkspaceInformation.php \Drupal\workspaces\WorkspaceInformation::isEntityIgnored()

File

core/modules/workspaces/src/WorkspaceInformation.php, line 85

Class

WorkspaceInformation
General service for workspace support information.

Namespace

Drupal\workspaces

Code

public function isEntityIgnored(EntityInterface $entity) : bool {
    $entity_type = $entity->getEntityType();
    if ($this->isEntityTypeIgnored($entity_type)) {
        return TRUE;
    }
    if ($entity_type->hasHandlerClass('workspace')) {
        $handler = $this->entityTypeManager
            ->getHandler($entity_type->id(), 'workspace');
        return !$handler->isEntitySupported($entity);
    }
    return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.