interface WorkspaceInformationInterface
Same name in other branches
- 11.x core/modules/workspaces/src/WorkspaceInformationInterface.php \Drupal\workspaces\WorkspaceInformationInterface
Provides an interface for workspace-support information.
Hierarchy
- interface \Drupal\workspaces\WorkspaceInformationInterface
Expanded class hierarchy of WorkspaceInformationInterface
All classes that implement WorkspaceInformationInterface
6 files declare their use of WorkspaceInformationInterface
- EntityReferenceSupportedNewEntitiesConstraintValidator.php in core/
modules/ workspaces/ src/ Plugin/ Validation/ Constraint/ EntityReferenceSupportedNewEntitiesConstraintValidator.php - EntitySchemaSubscriber.php in core/
modules/ workspaces/ src/ EventSubscriber/ EntitySchemaSubscriber.php - QueryFactory.php in core/
modules/ workspaces/ src/ EntityQuery/ QueryFactory.php - QueryTrait.php in core/
modules/ workspaces/ src/ EntityQuery/ QueryTrait.php - WorkspaceSafeFormTrait.php in core/
lib/ Drupal/ Core/ Entity/ Form/ WorkspaceSafeFormTrait.php
File
-
core/
modules/ workspaces/ src/ WorkspaceInformationInterface.php, line 11
Namespace
Drupal\workspacesView source
interface WorkspaceInformationInterface {
/**
* Determines whether an entity can belong to a workspace.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to check.
*
* @return bool
* TRUE if the entity can belong to a workspace, FALSE otherwise.
*/
public function isEntitySupported(EntityInterface $entity) : bool;
/**
* Determines whether an entity type can belong to a workspace.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type to check.
*
* @return bool
* TRUE if the entity type can belong to a workspace, FALSE otherwise.
*/
public function isEntityTypeSupported(EntityTypeInterface $entity_type) : bool;
/**
* Returns an array of entity types that can belong to workspaces.
*
* @return \Drupal\Core\Entity\EntityTypeInterface[]
* An array of entity type definition objects.
*/
public function getSupportedEntityTypes() : array;
/**
* Determines whether CRUD operations for an entity are allowed.
*
* CRUD operations for an ignored entity are allowed in a workspace, but their
* revisions are not tracked.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to check.
*
* @return bool
* TRUE if CRUD operations of an entity type can safely be done inside a
* workspace, without impacting the Live site, FALSE otherwise.
*/
public function isEntityIgnored(EntityInterface $entity) : bool;
/**
* Determines whether CRUD operations for an entity type are allowed.
*
* CRUD operations for an ignored entity type are allowed in a workspace, but
* their revisions are not tracked.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type to check.
*
* @return bool
* TRUE if CRUD operations of an entity type can safely be done inside a
* workspace, without impacting the Live site, FALSE otherwise.
*/
public function isEntityTypeIgnored(EntityTypeInterface $entity_type) : bool;
/**
* Determines whether an entity can be deleted in the given workspace.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity object which needs to be checked.
* @param \Drupal\workspaces\WorkspaceInterface $workspace
* The workspace in which the entity needs to be checked.
*
* @return bool
* TRUE if the entity can be deleted, FALSE otherwise.
*/
public function isEntityDeletable(EntityInterface $entity, WorkspaceInterface $workspace) : bool;
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
WorkspaceInformationInterface::getSupportedEntityTypes | public | function | Returns an array of entity types that can belong to workspaces. |
WorkspaceInformationInterface::isEntityDeletable | public | function | Determines whether an entity can be deleted in the given workspace. |
WorkspaceInformationInterface::isEntityIgnored | public | function | Determines whether CRUD operations for an entity are allowed. |
WorkspaceInformationInterface::isEntitySupported | public | function | Determines whether an entity can belong to a workspace. |
WorkspaceInformationInterface::isEntityTypeIgnored | public | function | Determines whether CRUD operations for an entity type are allowed. |
WorkspaceInformationInterface::isEntityTypeSupported | public | function | Determines whether an entity type can belong to a workspace. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.