function WorkspaceSafeFormTrait::getWorkspaceInfo
Same name in other branches
- 11.x core/lib/Drupal/Core/Entity/Form/WorkspaceSafeFormTrait.php \Drupal\Core\Entity\Form\WorkspaceSafeFormTrait::getWorkspaceInfo()
Retrieves the workspace information service.
Return value
\Drupal\workspaces\WorkspaceInformationInterface The workspace information service.
File
-
core/
lib/ Drupal/ Core/ Entity/ Form/ WorkspaceSafeFormTrait.php, line 65
Class
- WorkspaceSafeFormTrait
- Provides helpers for checking whether objects in forms are workspace-safe.
Namespace
Drupal\Core\Entity\FormCode
protected function getWorkspaceInfo() : WorkspaceInformationInterface {
if (!$this->workspaceInfo) {
$this->workspaceInfo = \Drupal::service('workspaces.information');
}
return $this->workspaceInfo;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.