public function WorkspaceAssociation::workspaceInsert in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::workspaceInsert()
Responds to the creation of a new workspace entity.
Parameters
\Drupal\workspaces\WorkspaceInterface $workspace: The workspaces that was inserted.
Overrides WorkspaceAssociationInterface::workspaceInsert
File
- core/
modules/ workspaces/ src/ WorkspaceAssociation.php, line 122
Class
- WorkspaceAssociation
- Provides a class for CRUD operations on workspace associations.
Namespace
Drupal\workspacesCode
public function workspaceInsert(WorkspaceInterface $workspace) {
// When a new workspace has been saved, we need to copy all the associations
// of its parent.
if ($workspace
->hasParent()) {
$this
->initializeWorkspace($workspace);
}
}