protected function buildContextFromWorkspaceName($workspaceName, array $dimensions = null) { $contextProperties = ['workspaceName' => $workspaceName, 'invisibleContentShown' => true, 'inaccessibleContentShown' => true]; if ($dimensions !== null) { $contextProperties['dimensions'] = $dimensions; } return $this->contextFactory->create($contextProperties); }