Generate a HTML link to an asset.

@param  string  $url
@param  string  $title
@param  array   $attributes
@param  bool    $secure
@return string
186019
public function linkAsset($url, $title = null, $attributes = array(), $secure = null)
	{
		$url = $this->url->asset($url, $secure);

		return $this->link($url, $title ?: $url, $attributes, $secure);
	}
370362
public function inline($source, $attributes = [], $secure = null)
    {

        return '<script type="text/javascript" ' . $this->attributes($attributes) . '>' . $source . '</script>' . PHP_EOL;
    }
1065257
public function _link($title, $url = null, $options = array(), $confirmMessage = false) {
			
		$escapeTitle = true;
		if($url === null) {
			$url = $this->url($title,true);
			$title = htmlspecialchars_decode($url, ENT_QUOTES);
			$title = h(urldecode($title));
			$escapeTitle = false;
		} elseif($url !== false){
			$url = $this->url($url,true);	
		}
		
	

		if (isset($options['escapeTitle'])) {
			$escapeTitle = $options['escapeTitle'];
			unset($options['escapeTitle']);
		} elseif (isset($options['escape'])) {
			$escapeTitle = $options['escape'];
		}

		if ($escapeTitle === true) {
			$title = h($title);
		} elseif (is_string($escapeTitle)) {
			$title = htmlentities($title, ENT_QUOTES, $escapeTitle);
		}

		if (!empty($options['confirm'])) {
			$confirmMessage = $options['confirm'];
			unset($options['confirm']);
		}
		if ($confirmMessage) {
			$options['onclick'] = $this->_confirm($confirmMessage, 'return true;', 'return false;', $options);
		} elseif (isset($options['default']) && !$options['default']) {
			if (isset($options['onclick'])) {
				$options['onclick'] .= ' ';
			} else {
				$options['onclick'] = '';
			}
			$options['onclick'] .= 'event.returnValue = false; return false;';
			unset($options['default']);
		}

		if ($url === false) {
			return sprintf($this->_tags['linknohref'], $this->_parseAttributes($options), $title);
		}		
		return sprintf($this->_tags['link'], $url, $this->_parseAttributes($options), $title);
	}
11198
public function url($text, $url, $parameters = [], $secure = null)
    {
        return $this->addElement('a')->text($text)
            ->href(url($url, $parameters, $secure));
    }
686820
function(url, win, attributes) {
        var o = {
            id:   Y.guid(),
            type: TYPE_CSS,
            rel:  STYLESHEET,
            href: url
        };
        if (attributes) {
            Y.mix(o, attributes);
        }
        return _node("link", o, win);
    }
1293770
def link(self, content, link, title=''):
        

        link = links.resolve(link, self._search_path,
                             self._config.get('absolute'))

        return '{}{}</a>'.format(
            utils.make_tag('a', {
                'href': link,
                'title': title if title else None
            }),
            content)
1244901
public function title($title, $url = null)
    {
        $this->title = $title;
        $this->url = $url;

        return $this;
    }
67079
public static function anchor(string $title, string $url = '', array $attributes = null) : string
    {
        // Add link
        if ($url !== '') $attributes['href'] = $url;
        return '<a'.Html::attributes($attributes).'>'.$title.'</a>';
    }
987222
public function style($url, $attributes = array())
	{
		$defaults = array('media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet');

		$attributes = $attributes + $defaults;

		$attributes['href'] = $this->url->asset($url);

		return '<link'.$this->attributes($attributes).'>'.PHP_EOL;
	}
478923
public function safe_anchor($uri = '', $title = '', $attributes = [])
    {
        $uri   = html_escape($uri);
        $title = html_escape($title);

        $new_attr = [];
        foreach ($attributes as $key => $val) {
            $new_attr[html_escape($key)] = html_escape($val);
        }

        return anchor($uri, $title, $new_attr);
    }
49647
public function asset($asset, $secure = null)
    {
        return url('themes/' . $this->getCurrent() . '/' . $asset, null, $secure);
    }
536583
public function url($path = null, $parameters = [], $secure = null)
    {
        return Url::to($this->uri() . '/' . $path, $parameters, $secure);
    }
1077519
public static function generate_html_id($title)
    {
        $t = $title;
        $t = str_replace('&amp;', '-and-', $t);
        $t = str_replace('&', '-and-', $t);
        $t = preg_replace('/[^A-Za-z0-9]+/', '-', $t);
        $t = preg_replace('/-+/', '-', $t);
        $t = trim($t, '-');
        $t = strtolower($t);

        return $t;
    }
929571
public function link($title, $url = null, $options = array(), $confirmMessage = false) {
		$exit = false;
		if (isset($options['onActive'])){
			list($url,$options) = $this->_onActive($url,$options);
		}

		if (isset($options['onHide'])){
			list($url,$options,$exit)= $this->_onHide($url,$options);
		}

		if (isset($options['onDisabled'])){
			list($url,$options) = $this->_onDisabled($url,$options);
		}		
		return  ($exit)? false : $this->_link($title,$url,$options,$confirmMessage);
	}
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;
    }
1235170
public function setHome($title, $url=NULL) {
		
		$path			= new \stdClass();
		$path->title	= $title;
		$path->url		= $url;
		$path->active	= count($this->paths) > 1 ? FALSE : TRUE;
		
		$this->paths[0] = $path;
		
	}
232812
public static function Image( $url, $title, $class = "", $width = NULL, $height = NULL )
	{
		$attributes	= array(
			'src'		=> $url,
			'class'		=> $class		? $class : NULL,
			'width'		=> $width		? $width : NULL,
			'height'	=> $height		? $height : NULL,
			'alt'		=> $title		? $title : NULL,
			'title'		=> $title		? $title : NULL,
			'hspace'	=> 0,
			'vspace'	=> 0,
		);
		$code	= UI_HTML_Tag::create( "img", NULL, $attributes );
		return $code;
	}