Neos\Neos\Service\UserService::getUserWorkspace PHP Метод

getUserWorkspace() публичный Метод

Deprecated, use getPersonalWorkspace() instead.
Устаревший: 2.1
public getUserWorkspace ( ) : Workspace
Результат Neos\ContentRepository\Domain\Model\Workspace
    public function getUserWorkspace()
    {
        return $this->getPersonalWorkspace();
    }

Usage Example

 /**
  * Returns the node this even refers to, if it can be resolved.
  *
  * It might happen that, if this event refers to a node contained in a site which is not available anymore,
  * Doctrine's proxy class of the Site domain model will fail with an EntityNotFoundException. We catch this
  * case and return NULL.
  *
  * @return NodeInterface
  */
 public function getNode()
 {
     try {
         $context = $this->contextFactory->create(array('workspaceName' => $this->userService->getUserWorkspace()->getName(), 'dimensions' => $this->dimension, 'currentSite' => $this->getCurrentSite(), 'invisibleContentShown' => true));
         return $context->getNodeByIdentifier($this->nodeIdentifier);
     } catch (EntityNotFoundException $e) {
         return null;
     }
 }