Add workspace to document.

@param string $title

@return Workspace

@since 1.0
970556
public function addWorkspace($title)
    {
        $workspaces = $this->getWorkspaces();

        /** @var Workspace $workspace */
        $workspace = $this->getExtensions()->createElement($this, 'app:workspace');
        $workspace->addTitle($title);

        $workspaces[] = $workspace;
        $this->setCachedProperty('workspaces', $workspaces);

        return $workspace;
    }
412163
public function add($title)
    {
        $item = $this->menu->addItem($title);
        $item->parent_id = $this->id;
        $item->parent = $this;

        return $item;
    }
129502
protected function setterTitle(string $title): string
	{
		$this->translator->set($this->name, $title);
		return $title;
	}
779133
public function _htmlHeader($title)
    {

        $output = $this->_doctype();
        $output .= '<html lang="en">'."\n";
        $output .= "<head>\n\n";

        $output .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'."\n\n";
        $output .= '<meta name="generator" content="PHPDoctor '.$this->_doclet->version().' (http://peej.github.com/phpdoctor/)">'."\n";
        $output .= '<meta name="when" content="'.gmdate('r').'">'."\n\n";

        $output .= '<link rel="stylesheet" type="text/css" href="'.str_repeat('../', $this->_depth).'stylesheet.css">'."\n";
        $output .= '<link rel="start" href="'.str_repeat('../', $this->_depth).'namespaces.html">'."\n\n";

        $output .= '<title>';
        if ($title) {
            $output .= $title.' ('.$this->_doclet->windowTitle().')';
        } else {
            $output .= $this->_doclet->windowTitle();
        }
        $output .= "</title>\n\n";
        $output .= "</head>\n";

        return $output;

    }
900793
public function setTitle($title)
    {
        $this->title = $title;
        $this->normalizedTitle = UrlUtil::normalize($title);
        return $this;
    }
220602
public static function appendNamespaces (string $description)
    {
        $treeBuilder = new TreeBuilder("namespaces");
        $node = \method_exists($treeBuilder, "getRootNode")
            ? $treeBuilder->getRootNode()
            : $treeBuilder->root("namespaces");

        $node
            ->scalarPrototype()->end()
            ->validate()
            ->ifTrue(
                function (array $paths)
                {
                    foreach ($paths as $namespace => $path)
                    {
                        if (1 !== \preg_match('~^' . Asset::NAMESPACE_REGEX . '$~', $namespace))
                        {
                            return true;
                        }
                    }

                    return false;
                }
            )
            ->thenInvalid("The namespaces must start with a-z and can only contain a-z and 0-9.")
            ->end()
            ->validate()
            ->ifTrue(
                function (array $paths)
                {
                    foreach ($paths as $path)
                    {
                        if (!\is_string($path))
                        {
                            return true;
                        }

                        if (false !== \strpos($path, "..."))
                        {
                            return true;
                        }
                    }

                    return false;
                }
            )
            ->thenInvalid("The namespaces can't be outside of the project root (and can't use '..' in their paths).")
            ->end()
            ->info($description)
            ->defaultValue([]);

        return $node;
    }
1043727
public function createAnchorLink($title)
    {
        $anchor = strtolower($title);

        // Check if we already have link to an anchor with the same name, and add count suffix
        $linkCounts = array_count_values(self::$links);
        $anchorSuffix = array_key_exists($anchor, $linkCounts)
            ? '-' . $linkCounts[$anchor] : '';
        array_push(self::$links, $anchor);

        return sprintf("[%s](%s)", $title, '#' . $anchor . $anchorSuffix);
    }
63572
public function getByTitle($title)
    {
        return new View(
            $this->getContext(),
            new ResourcePathServiceOperation($this->getContext(),$this->getResourcePath(),"getByTitle",array(rawurlencode($title)))
        );
    }
563712
public function addTo($address, $title = '')
    {
        array_push(
            $this->toAddresses,
            $this->formatEmailAddress($address, $title)
        );

        return $this;
    }
907347
public function setTitle(string $title) {
        if($this->setModified('title', $title)->isModified()) {
            $this->title = $title;
        }

        return $this;
    }
1342919
public function setTitle($title)
    {
        $returnValue = (bool) false;

        
		$this->title = $title;
		$returnValue = true;
        

        return (bool) $returnValue;
    }
806117
public function add(string $title, string $detail = ''):Error
    {
        $err = (new Error())
            ->setTitle($title)
            ->setDetails($detail);

        $this->errors[] = $err;
        return $err;
    }
695893
public function setTitle(string $title): self
    {
        if (strlen($title) > 31) {
            $title = mb_substr($title, 0, 31);
        }

        $this->title = $title;

        return $this;
    }
172095
public function title($title)
    {
        if ($this->isNotSetOrEmpty($title)) {
            throw CouldNotCreateButton::titleNotProvided();
        } elseif (mb_strlen($title) > 20) {
            throw CouldNotCreateButton::titleLimitExceeded($title);
        }

        $this->payload['title'] = $title;

        return $this;
    }
1195320
public function setTitle(string $title): self
    {
        $this->checkContentType();
        $this->isValidString($title, 20);

        $this->title = $title;

        return $this;
    }
877793
protected function formatTitleWithAccessKey( $title ) {
		if ( $this->fieldWidget && method_exists( $this->fieldWidget, 'formatTitleWithAccessKey' ) ) {
			return $this->fieldWidget->formatTitleWithAccessKey( $title );
		}
		return $title;
	}
1164033
public static function titleContains($title)
    {
        return new static(
            function (WebDriver $driver) use ($title) {
                return mb_strpos($driver->getTitle(), $title) !== false;
            }
        );
    }