You are here

public function Workspace::hasParent in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/Entity/Workspace.php \Drupal\workspaces\Entity\Workspace::hasParent()
  2. 9 core/modules/workspaces/src/Entity/Workspace.php \Drupal\workspaces\Entity\Workspace::hasParent()

Determines whether the workspace has a parent.

Return value

bool TRUE if the workspace has a parent, FALSE otherwise.

Overrides WorkspaceInterface::hasParent

File

core/modules/workspaces/src/Entity/Workspace.php, line 150

Class

Workspace
The workspace entity class.

Namespace

Drupal\workspaces\Entity

Code

public function hasParent() {
  return !$this
    ->get('parent')
    ->isEmpty();
}