This method is alias of link().

echo Asset::anchor('/user/add', 'Add User');
echo Asset::anchor('/user/add', 'Add User', ['required' => 'yes']);

@return mixed
772544
public function anchor()
    {
        $args = [];
        $args = func_get_args();

        if (isset($args[2])) {
            $args[2] = array_merge($args[2], ['type' => 'static']);
        } else {
            $args[2] = ['type' => 'static'];
        }

        return call_user_func_array([new static($this->container), 'link'], $args);
    }
422011
protected function link($link, $anchor = "") {
        $link = trim($link);
        if (preg_match("/^(https?|s?ftp):\/\/.+$/i", $link)) {
            $link = trim($link, ",.?!");
            return array('content' => $link, 'url' => $link);
        } else {
            $callbackargs = $this->linkgeneratorcallbackargs;
            $callbackargs['anchor'] = $anchor;
            $link = call_user_func_array($this->linkgeneratorcallback, array($link, $callbackargs));

            if (isset($link['link_info'])) {
                $l = $link['link_info']['link'];
                unset($link['link_info']['link']);
                $this->returnvalues['link_count'][$l] = $link['link_info'];
            }
            return $link;
        }
    }
1122882
public function forTemplate()
    {
        if ($this->LinkURL) {
            $link = $this->renderWith([
                // Render link with this template if its found. eg Link_button.ss
                Link::class . '_' . $this->Template,
                Link::class
            ]);

            // Legacy. Recommended to use templating above.
            $this->extend('updateLinkTemplate', $this, $link);

            return $link;
        }

        return '';
    }
127376
public function attach()
    {
        $this->detectReturnType();

        if (empty($_REQUEST['broker'])) {
            return $this->fail("No broker specified", 400);
        }

        if (empty($_REQUEST['token'])) {
            return $this->fail("No token specified", 400);
        }

        if (!$this->returnType) {
            return $this->fail("No return url specified", 400);
        }

        $checksum = $this->generateAttachChecksum($_REQUEST['broker'], $_REQUEST['token']);

        if (empty($_REQUEST['checksum']) || $checksum != $_REQUEST['checksum']) {
            return $this->fail("Invalid checksum", 400);
        }

        $this->startUserSession();
        $sid = $this->generateSessionId($_REQUEST['broker'], $_REQUEST['token']);

        $this->cache->set($sid, $this->getSessionData('id'));
        $this->outputAttachSuccess();
    }
500612
public function initHeadLink()
    {
        $cssPath = $this->options->getCss()->getPath();
        $stylesheets = $this->orderByPriority($this->options->getCss()->getStylesheets());
        foreach ($stylesheets as $css) {
            if (isset($css["media"])) {
                $this->headLink->appendStylesheet($cssPath . "/" . $css["name"], $css["media"], false, array());
            } else {
                $this->headLink->appendStylesheet($cssPath . "/" . $css["name"], 'screen', false, array());
            }
        }

        return $this;
    }
1179892
public function getLink()
    {
        if ($this->oxmediaurls__oxisuploaded->value) {
            $sUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->isSsl() ? \OxidEsales\Eshop\Core\Registry::getConfig()->getSslShopUrl() : \OxidEsales\Eshop\Core\Registry::getConfig()->getShopUrl();
            $sUrl .= 'out/media/';
            $sUrl .= basename($this->oxmediaurls__oxurl->value);
        } else {
            $sUrl = $this->oxmediaurls__oxurl->value;
        }

        return $sUrl;
    }
608910
public function indexAction()
    {
        if($this->identity()) {
            return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
        }
        
        $user = new User;
        $form = $this->getUserFormHelper()->createUserForm($user, 'SignUp');
        if($this->getRequest()->isPost()) {
            $form->setValidationGroup('username', 'email', 'firstName', 'lastName', 'password', 'passwordVerify', 'question', 'answer', 'csrf', 'captcha');
            $form->setData($this->getRequest()->getPost());    
            if($form->isValid()) {
                $entityManager = $this->getEntityManager();
                $user->setState($entityManager->find('CsnUser\Entity\State', 1));
                $user->setRole($entityManager->find('CsnUser\Entity\Role', 2));
                $user->setEmailConfirmed(false);
                $user->setLanguage($entityManager->find('CsnUser\Entity\Language', 1));
                $user->setRegistrationDate(new \DateTime());
                $user->setRegistrationToken(md5(uniqid(mt_rand(), true)));
                $user->setPassword(UserCredentialsService::encryptPassword($user->getPassword()));
                
    		    try {
    		        $fullLink = $this->getBaseUrl() . $this->url()->fromRoute('user-register', array('action' => 'confirm-email', 'id' => $user->getRegistrationToken()));
    		        $this->sendEmail(
    		            $user->getEmail(),
    		            $this->getTranslatorHelper()->translate('Please, confirm your registration!'),
    		            sprintf($this->getTranslatorHelper()->translate('Please, click the link to confirm your registration => %s'), $fullLink)
    		        );
    		        $entityManager->persist($user);
                    $entityManager->flush();

                    $viewModel = new ViewModel(array(
                        'email' => $user->getEmail(),
                        'navMenu' => $this->getOptions()->getNavMenu()
                    ));
                    $viewModel->setTemplate('csn-user/registration/registration-success');
                    return $viewModel;
    		    } catch (\Exception $e) {
                    return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView(
    				    $this->getTranslatorHelper()->translate('Something went wrong when trying to send activation email! Please, try again later.'),
    					$e,
    					$this->getOptions()->getDisplayExceptions(),
    					$this->getOptions()->getNavMenu()
    				);
    			}
            }
        }   

        $viewModel = new ViewModel(array(
            'form' => $form,
            'navMenu' => $this->getOptions()->getNavMenu()
        ));
        $viewModel->setTemplate('csn-user/registration/registration');
        return $viewModel;
    }
125965
private function createSecondLink()
    {
        $content = '';
        $content .=
            "<a href='".$this->currentPageUrl.'/'.$this->lastPageMinusOne."'>$this->lastPageMinusOne</a>";
        $content .=
            "<a href='".$this->currentPageUrl.'/'.$this->lastPage."'>$this->lastPage</a>";

        return $content;
    }
325308
public function actionIndex()
    {
        if (!$this->hasAccess()) {
            return $this->redirect(['login']);
        }
        
        foreach ($this->module->assetFiles as $class) {
            $this->registerAsset($class);
        }

        return $this->render('index', [
            'title' => 'Styleguide',
            'showDomain' => true,
            'styleguide' => $this->extractElementsFromComponent()
        ]);
    }
417762
public function buildUrl()
    {

        $url = rtrim($this->apiUrl, '/') . '?';

        // Add token
        $url .= 'token=' . $this->diffbot->getToken();

        // Add query
        $url .= '&query=' . urlencode($this->query);

        // Add other options
        foreach ($this->otherOptions as $option => $value) {
            $url .= '&' . $option . '=' . $value;
        }

        return $url;
    }
1084042
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The file location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        $form = $this->getFileAddForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute(
                'sc-admin/file/add',
                ['parent' => $parent]
            )
        );
        $request = $this->getRequest();

        if ($request->isPost()) {
            $post = array_merge_recursive(
                $request->getPost()->toArray(),
                $request->getFiles()->toArray()
            );
            $form->setData($post);
            if ($form->isValid()) {
                try {
                    $transfer = $this->getFileTransfer();
                    $data = $transfer->receive($form->getData());
                    $fileIds = $this->getFileService()->makeFiles(
                        $parent, $data
                    );
                    return $this->redirect()->toRoute(
                        'sc-admin/file/edit',
                        ['id' => implode(',', $fileIds)]
                    );
                } catch (Exception $e) {
                    if (isset($data)) {
                        $transfer->rollBack($data);
                    }
                    if ($e instanceof RuntimeException) {
                        $this->flashMessenger()->addMessage($e->getMessage());
                        return $this->redirect()
                            ->toRoute('sc-admin/content-manager')
                            ->setStatusCode(303);
                    } elseif (DEBUG_MODE) {
                        throw new DebugException(
                            $e->getMessage(),
                            $e->getCode(),
                            $e
                        );
                    }
                }
            }
        }
        return new ViewModel([
            'form' => $form,
        ]);
    }
1143187
public function getLink()
    {
        if ($this->owner->isURL() && $this->owner->LinkURL) {
            return $this->owner->dbObject('LinkURL')->URL();
        }
        
        if ($this->owner->isPage() && $this->owner->LinkPageID) {
            return $this->owner->LinkPage()->Link();
        }
    }
518795
public function LinkOrCurrent()
    {
        $isCurrent = null;
        $this->extend('updateLinkOrCurrent', $isCurrent);
        if ($isCurrent) {
            return $this->config()->get('linking_mode_current');
        } else {
            return $this->config()->get('linking_mode_default');
        }
    }
922599
public function getSelfActionLink()
    {
        if (($sValue = $this->getViewConfigParam('selfactionlink')) === null) {
            $sValue = $this->getConfig()->getShopCurrentUrl();
            $this->setViewConfigParam('selfactionlink', $sValue);
        }

        return $sValue;
    }
736607
protected function tagLink()
	{
		// Initialize string
		$html = '';

		// Add favicon link tags
		$this->addFavicon();

		// Add stylesheets link tags
		$this->addStyleSheets();

		foreach ($this->link as $link)
		{
			if (array_key_exists(1, $link) && $link[1] && array_key_exists(0, $link) && $link[0])
			{
				// Initialize starting string for conditional comments
				$start_cond = '';
				// Initialize ending string for conditional comments
				$end_cond = '';
				// Initialize string for type attribute
				$type = '';
				// Initialize string for other attributes
				$attr = '';

				// Check for conditional comments
				if (array_key_exists(4, $link) && $link[4])
				{
					// Set starting string for conditional comments
					$start_cond = '<!--[if '.$link[4].']>';
					// Set ending string for conditional comments
					$end_cond = '<![endif]-->';
				}

				// Check for attributes
				if (array_key_exists(3, $link) && is_array($link[3]))
				{
					foreach ($link[3] as $name => $content)
					{
						// Check if values are not empty
						if ($name && $content)
						{
							// Set strings for each attribute
							$attr .= ' '.$name.'="'.$content.'"';
						}
					}
				}

				// Check for type attribute
				if (array_key_exists(2, $link) && $link[2])
				{
					// Set string for type attribute
					$type = ' type="'.$link[2].'"';
				}

				// Return tag for each registered link
				$html .= $start_cond.'<link rel="'.$link[0].'" href="'.$link[1].'"'.$type.$attr.'>'.$end_cond . "\n\t";
			}
		}

		// Return complete string
		return $html;
	}
37490
protected function postLinks($arrows = true) {
        $paging = '';
        if (self::$current != self::$totalPages && $arrows) {
            $paging .= $this->buildLink((self::$current + 1), '&gt;');
            if (self::$current != (self::$totalPages - 1)) { $paging .= $this->buildLink(self::$totalPages, '&raquo;'); }
        }
        return $paging;
    }
276059
public function link() {
		$link = get_term_link($this);
		$link = apply_filters('timber_term_link', $link, $this);
		return apply_filters('timber/term/link', $link, $this);
	}