You are here

public function WorkspaceManager::loadByMachineName in Multiversion 8

Parameters

string $machine_name:

Overrides WorkspaceManagerInterface::loadByMachineName

File

src/Workspace/WorkspaceManager.php, line 89

Class

WorkspaceManager

Namespace

Drupal\multiversion\Workspace

Code

public function loadByMachineName($machine_name) {
  $workspaces = $this->entityTypeManager
    ->getStorage('workspace')
    ->loadByProperties([
    'machine_name' => $machine_name,
  ]);
  return current($workspaces);
}