Click a link within the page header tag.

@param string $link Link text.
558912
public function clickLinkInHeader(string $link)
    {
        $header_link = $this->find('css', '.page-title-action');

        if ($header_link->getText() === $link) {
            $header_link->click();
        } else {
            $this->getHeaderElement()->clickLink($link);
        }
    }
195803
public function createLink($label, $href = null)
    {
        $link = new Link($label, $href);

        if ( ! $this->links instanceof ArrayIterator) {
            $this->links = new ArrayIterator();
        }

        $this->links->push($link);
    }
357858
public function fill_links($links) {
	foreach ($links as $key => $link) {
		$this->add_link($key, $link);
	}
}
1057249
public function asLink($href=NULL,$target=NULL) {
		if (isset($href)) {
			$_target="";
			if(isset($target))
				$_target="target='{$target}'";
			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
		}
		return $this->addToProperty("class", "link");
	}
6932
public function isLinkAllowed(string $link): bool
	{
		$this->prepareLink($link);
		return $this->links[$link]->allowed;
	}
1266161
public function addJs($link) {
        
        if ( ! empty($link)) {
            if ( ! is_array($link)) {
                $link = [$link];
            }
            $this->js = array_merge($this->js, $link);
        }
    }
732039
private function setLink($type, $title, $href)
    {
        $this->links[$type] = [
            'rel' => $type,
            'title' => $title,
            'href' => $href
        ];
    }
406897
public function assertSeeLink($link)
    {
        if ($this->resolver->prefix) {
            $message = "Did not see expected link [{$link}] within [{$this->resolver->prefix}].";
        } else {
            $message = "Did not see expected link [{$link}].";
        }

        PHPUnit::assertTrue(
            $this->seeLink($link),
            $message
        );

        return $this;
    }
183747
public function _linkText($link, $doclet)
    {
        $element =& $this->_resolveLink();
        if ($element && $this->_parent) {
            $package =& $this->_parent->containingPackage();
            $path = str_repeat('../', $package->depth() + 1).$element->asPath();

            return $doclet->formatLink($path, $link);
        } elseif (preg_match('/^(https?|ftp):\/\//', $this->_link) === 1) {
            return $doclet->formatLink($this->_link, $link);
        } else {
            return $link;
        }
    }
164919
public function link($link, $text=null, $title=null, $popup=false, $class=null) {
		if (is_null($text)) {
			// if no text is given, we use the text originally provided by the user
			$text = $link;
		}

		// deal with internal and (slightly) malformed links
		$link = $this->getLink($link);

		$attributes = $this->getHtmlAttributes(array(
			'title'=>$title,
			'target'=>$this->isTrue($popup)?"blank":null,
			'class'=>$class
		));

		return "<a href='$link'$attributes>$text</a>";
	}
354936
public function addLink(Link $link)
    {
        $name = $link->getName();

        if (isset($this->links[$name])) {
            throw new \LogicException(sprintf('A link name by "%s" is already exists.', $name));
        }

        $this->links[$name] = $link;
    }
658396
public function hasLink($link) {
        $found = false;
        array_walk_recursive($this->navigation, function($value, $key) use (&$found, $link) {
            if ($value == $link && $key === 'uri') {
                $found = true;
            }
        });
        return $found;
    }
379440
protected function processLinkHtml($link)
    {
        $_html  = !empty($link[0]) ? $link[0] : '';
        $_href  = !empty($link[1]) ? $link[1] : '';
        $_url   = !empty($link[2]) ? $link[2] : '';
        $_title = isset($link[3]) && strip_tags($link[3]) ? strip_tags($link[3]) : $_url;

        // --------------------------------------------------------------------------

        /**
         * Only process if there's at least the HTML tag and a detected URL
         * otherwise it's not worth it/possible to accurately replace the tag
         */

        if ($_html && $_url) {
            $_html = $this->processLinkGenerate($_html, $_url, $_title, true);
        }

        return $_html;
    }
309175
public static function link($target, $link)
  {
    if (! windows_os()) {
      return symlink($target, $link);
    }

    $mode = is_dir($target) ? 'J' : 'H';

    exec("mklink /{$mode} \"{$link}\" \"{$target}\"");
  }
708056
function symlink($target, $link)
    {
        if ($this->exists($link)) {
            $this->unlink($link);
        }

        symlink($target, $link);
    }
560689
public function setItem($link, $title)
    {
        $this->setLink($link);
        $this->setTitle($title);
        
        return $this;
    }
580579
public function setLink(string $host, Link $link): void
    {
        $this->links[$host] = $link;
    }