Neos\ContentRepository\Domain\Model\Workspace::getTitle PHP Method

getTitle() public method

Returns the workspace title
public getTitle ( ) : string
return string
    public function getTitle()
    {
        return $this->title;
    }

Usage Example

 /**
  * Update a workspace
  *
  * @param Workspace $workspace A workspace to update
  * @return void
  */
 public function updateAction(Workspace $workspace)
 {
     if ($workspace->getTitle() === '') {
         $workspace->setTitle($workspace->getName());
     }
     $this->workspaceRepository->update($workspace);
     $this->addFlashMessage($this->translator->translateById('workspaces.workspaceHasBeenUpdated', [$workspace->getTitle()], null, null, 'Modules', 'Neos.Neos'));
     $this->redirect('index');
 }