protected function createLink($content, $href = '#', $title = null) {
    $content = (string) $content;
    $href    = (string) $href;
    $title   = (string) $title;

    if (empty($title)) {
      $title = $content;
    }

    $link = GeneralUtility::makeInstance('TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder');
    $link->setTagName('a');
    $link->addAttribute('href', $href);
    $link->addAttribute('title', $title);
    $link->setContent($content);

    return $link;
  }
protected function createLink($content, $href = '#', $title = null) {
    $content = (string) $content;
    $href    = (string) $href;
    $title   = (string) $title;

    if (empty($title)) {
      $title = $content;
    }

    $link = GeneralUtility::makeInstance('TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder');
    $link->setTagName('a');
    $link->addAttribute('href', $href);
    $link->addAttribute('title', $title);
    $link->setContent($content);

    return $link;
  }
protected function createLink ( $ content , $ href = '#' , $ title = null ) { $ content = ( string ) $ content ; $ href = ( string ) $ href ; $ title = ( string ) $ title ; if ( empty ( $ title ) ) { $ title = $ content ; } $ link = GeneralUtility :: makeInstance ( 'TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder' ) ; $ link -> setTagName ( 'a' ) ; $ link -> addAttribute ( 'href' , $ href ) ; $ link -> addAttribute ( 'title' , $ title ) ; $ link -> setContent ( $ content ) ; return $ link ; }
Creates a link.

@param string $content The content of the link
@param string $href The optional href attribute of the link, defaults to `#`
@param string $title The optional title attribute of the link
@return \TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder The link
Creates a link .