Neos\ContentRepository\Domain\Service\Context::getWorkspaceName PHP Method

getWorkspaceName() public method

Returns the name of the workspace.
public getWorkspaceName ( ) : string
return string
    public function getWorkspaceName()
    {
        return $this->workspaceName;
    }

Usage Example

 /**
  *
  *
  * @param NodeInterface $node
  * @param Context $context
  * @param $recursive
  * @return void
  */
 public function beforeAdoptNode(NodeInterface $node, Context $context, $recursive)
 {
     if (!$this->eventEmittingService->isEnabled()) {
         return;
     }
     $this->initializeAccountIdentifier();
     if ($this->currentlyAdopting === 0) {
         /* @var $nodeEvent NodeEvent */
         $nodeEvent = $this->eventEmittingService->emit(self::NODE_ADOPT, array('targetWorkspace' => $context->getWorkspaceName(), 'targetDimensions' => $context->getTargetDimensions(), 'recursive' => $recursive), NodeEvent::class);
         $nodeEvent->setNode($node);
         $this->eventEmittingService->pushContext();
     }
     $this->currentlyAdopting++;
 }
All Usage Examples Of Neos\ContentRepository\Domain\Service\Context::getWorkspaceName