Get link template
@param string $title
@param string $link
@param null|string $icon
@return string
436679
protected function templateLink($title, $link = null, $icon = null)
    {
        if (!isset($link)) {
            return '<span>' . $icon . $title . '</span>';
        }
        return '<a title="' . $title . '" href="' . $link . '">' . $icon . $title . '</a>';
    }
580802
public function link($title, $url = null, array $options = [])
    {
        $options = $this->addClass($options, $this->_class(__FUNCTION__));
        $options = Hash::merge([
            'escapeTitle' => false,
            'clear'       => false,
            'label'       => $title,
        ], $options);

        $isClear = (bool) $options['clear'];
        unset($options['clear']);

        $options = $this->_setTitleAttr($title, $options);

        //  Set title in html tag.
        if ($this->_isEscapeTitle($title, $isClear, $options)) {
            $title = $this->tag('span', $title, ['class' => $this->_class(__FUNCTION__) . '-title']);
        }

        $options = $this->_getBtnClass($options);
        $options = $this->_getToolTipAttr($options);

        list($title, $options) = $this->_createIcon($this, $title, $options);
        unset($options['label']);

        return parent::link($title, $url, $options);
    }
560667
public function editButton($row, $href, $label, $title, $icon, $attributes)
	{
		switch ($row['type'])
		{
			case 'group':
				return \Image::getHtml(str_replace('.', '_.', $icon), $label) . ' ';
			
			case 'element':
				return '<a href="'.$this->addToUrl($href.'&amp;id='.$row['id']).'" title="'.\StringUtil::specialchars($title).'"'.$attributes.'>'.\Image::getHtml($icon, $label).'</a> ';
		}
	}
450635
public function getIcon($title, Table $table) {
        if ($this->icon) {
            $icon = str_replace(array('%DATATABLE_ASSETS%', '%SIZE%'), array($table->getAssetsURL(), $this->iconSize . 'x' . $this->iconSize), $this->icon);
            if ('%MPF_ASSETS%' == substr($icon, 0, 12)) {
                $icon = AssetsPublisher::get()->mpfAssetFile(substr($icon, 12));
            }
            return Html::get()->image($icon, $title);
        }
        return '';
    }
59190
public function addIcon($icon, $link = null)
    {
        if (!$this->_icon) {
            $this->_icon = $this->add('Icon', null, 'icon');
        }
        $this->_icon->set($icon);
        if ($link) {
            $this->_icon->setElement('a')
                ->setAttr('href', $link);
        }

        $this->template->trySetHTML('before_input', '<span class="atk-input-icon atk-jackscrew">');
        $this->template->trySetHTML('after_input', '</span>');

        return $this->_icon;
    }
1157795
public function getLinkToAction($actionName, $params, $pk_link = false)
    {
        $action = isset($params['action']) ? $params['action'] : 'List' . sfInflector::camelize($actionName);

        $url_params = $pk_link ? '?' . $this->getPrimaryKeyUrlParams() : '\'';

        $params['icon'] = (isset($params['icon']) ? $params['icon'] : 'icon-th-list');
        $params['params']['class'] = (isset($params['params']['class']) ? $params['params']['class'] : 'btn');
        $params['only_icon'] = (isset($params['only_icon']) ? $params['only_icon'] : true);
        $params['size'] = $this->defaultSize($params);
        $params['params']['class'] .= ' ' . $params['size'];
        $title = '__(\'' . $params['label'] . '\', array(), \'' . $this->getI18nCatalogue() . '\')';
        $label = (!$params['only_icon'] ? ' \'.' . $title : '\'');

        return '[?php echo link_to(\'<i class="' . $params['icon'] . '"></i>'
        . $label . ', \'' . $this->getModuleName() . '/' . $action
        . $url_params . ', ' . $this->asPhp($params['params']) . ') ?]';
    }
560689
public function setItem($link, $title)
    {
        $this->setLink($link);
        $this->setTitle($title);
        
        return $this;
    }
923240
public String getHtml(String title) {

        return "<span class=\"v-icon "
            + m_styleName
            + " "
            + m_additionalButtonStyle
            + "\" title=\""
            + title
            + "\">&#x"
            + Integer.toHexString(getCodepoint())
            + ";</span>";
    }
503004
public function mtGet($table, $link, $title)
    {
        $result = new AutoArray($table);

        $modal = $this->modalDirector->build($title, 'Create', $result->merge(), $link, $this->MtModal);

        return $modal->modalHead.$modal->modalBody.$modal->modalFooter;
    }
718840
public function addGroup($title)
    {
        $group = $this->add([new self(), 'defaultTemplate' => 'menugroup.html', 'ui' => false]);
        if (is_string($title)) {
            $group->set('title', $title);
        } else {
            if (isset($title['icon']) && $title['icon']) {
                $group->add(new Icon($title['icon']), 'Icon')->removeClass('item');
            }
            $group->set('title', $title[0]);
        }

        return $group;
    }
473356
public static function createOrAppendsToTitle($title, $append) {
		
		$oWikiPage = new WikiPage ( $title );
		if ($oWikiPage->exists ()) {
			$Revision = Revision::newFromTitle ( $title );
			$WikiPageContent = $Revision->getContent ( Revision::RAW )->serialize (); // or: $WikiMarkup = WikiPage::getContent(...)->serialize();
			$oContent = ContentHandler::makeContent ( $WikiPageContent . "\n$append", $title );
			
			$Result = $oWikiPage->doEditContent ( $oContent, "auto-inserted by runStatistics", EDIT_UPDATE );
			if ($Result->ok) {
				return;
			} 
			throw new \Exception("Error saving: ".$title->getPrefixedText());
		} else {
			$oContent = ContentHandler::makeContent ( $append, $title );
			$Result = $oWikiPage->doEditContent ( $oContent, "auto-inserted by runStatistics", EDIT_NEW );
			if ($Result->ok) {
				return;
			} 
			throw new \Exception("Error saving: ".$title->getPrefixedText());
		}
	}
1296912
private function hBlockIncludingTitle(string $title, string $html): string
    {
        return preg_replace_callback('/(<h\d\s*>\s*(.*?)\s*<\/h\d\s*>)/iu', function ($match) use ($title) {
            if (strlen($match[2]) >= 3 && strpos($title, $match[2]) !== false) {
                return '<div>' . $match[2] . '</div>';
            }

            return $match[1];
        }, $html);
    }
355473
public function linkAction($action, $title = null, $parameters = [], $attributes = [])
    {
        return $this->link($this->url->action($action, $parameters), $title, $attributes);
    }
1002303
public function addAction($title, $link, array $options = [])
    {
        if (is_array($link)) {
            if (!isset($link['p'])) {
                $link['p'] = P;
            }
            if (!isset($link['do'])) {
                $link['do'] = P_DO;
            }

            // Removed "_default" from main action if called from Main and is the beginning of string
            if (stripos($link['do'], '_default') === 0) {
                $link['do'] = str_replace('_default_', '', $link['do']);
            }

            $link = Linker::makeUrl($link);
        }

        $options['link'] = $link;
        $this->actions[$title] = $options;

        return $this;
    }
134601
public static function heading(string $title, int $h = 1, array $attributes = null) : string
    {
        $output = '<h'.$h.Html::attributes($attributes).'>'.$title.'</h'.$h.'>';

        return $output;
    }
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>";
	}
1202020
public function linkTitle()
    {
        return $this->entity->param('link_title') ? $this->entity->param('link_title') : $this->entity->title;
    }