Creates an HTML link
@param string $title The content to be wrapped by <a> tags
@param string|array|null $url Cake-relative URL or array of URL
parameters or external URL
@param array $options Array of options and HTML attributes
@return string
495983
public function link($title, $url = null, array $options = [])
    {
        $options = optionsParser($options, ['escape' => false, 'title' => $title]);
        $options->add('title', trim(h(strip_tags($options->get('title')))))->tooltip();
        list($title, $options) = $this->addIconToText($title, $options);

        return parent::link($title, $url, $options->toArray());
    }
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>';
    }
88278
public function createItem($text, $href, $title = '')
    {
        $breadcrumb = new BreadcrumbObject();

        $breadcrumb->setText($text);
        $breadcrumb->setHref($href);

        if ($title) {
            $breadcrumb->setTitle($title);
        }

        $this->breadcrumbs[] = $breadcrumb;

        return $breadcrumb;
    }
247912
public static function linkAction($action, $title = null, $parameters = array(), $attributes = array())
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }
467507
public function hyperlink($label, $url, $options=array())
    {
        if (is_null($label) || $label === false) $label = $url;

        $options    = $this->getOptions($options);
        $attributes = $this->filterValidAttributes($options);

        return '<a href="'.$url.'"'.$this->Html->attributes($attributes).'>'.$this->Html->entities($label).'</a>';
    }
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>';
    }
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;
		
	}
879287
public function keyword($title, $content, $options=array()){

        $data = array();
        
        $data['title'] = $title;
        $data['content'] = $content;

        $data = array_merge($data, $options);
        $data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');

        return $this->request($this->keywordUrl, $data);
    }
811823
private function getOptionHtml($title, $name, $options)
    {
        $block = $this->_view->getLayout()->createBlock(\Magento\Framework\View\Element\Html\Select::class);
        $block->setOptions($options)
            ->setId('')
            ->setClass('')
            ->setTitle($title)
            ->setName($name)
            ->setExtraParams('style="width:160px"');

        return $block->toHtml();
    }
1207091
protected function _createIcon(HtmlHelper $html, $title, array $options = [])
    {
        list($options, $iconOptions) = $this->_createIconAttr($options);

        if (Arr::key('createIcon', $iconOptions)) {
            unset($iconOptions['createIcon']);
            $title = $html->icon($options['icon'], $iconOptions) . PHP_EOL . $title;
            unset($options['icon']);
        }

        if (Arr::key('iconInline', $options)) {
            unset($options['iconInline']);
        }

        return [$title, $options];
    }
914005
public function generateLinkFor($key, $content, $title = null)
    {
        $direction = $linkDirection = 'asc';

        if ($key === $this->getCurrentKey())
        {
            $direction = ($this->getCurrentDirection() === 'asc') ? 'desc' : 'asc';
            $linkDirection = ($this->getCurrentDirection() === 'desc') ? 'desc' : 'asc';
        }

        $params = array_merge(
            $this->getQueryParams(),
            [
                's' => $key,
                'd' => $direction
            ]
        );

        $url = qs_url(
            $this->getCurrentRequestPath(),
            $params
        );

        return sprintf(
            '<a title="%s" class="%s %s %s" href="%s">%s</a>',
            $title,
            static::linkClass,
            static::linkPrefix . $linkDirection,
            ($key === $this->getCurrentKey()) ? static::linkPrefix . 'active' : '',
            $url,
            $content
        );
    }
925694
private function parseMenuItems($title, string $url, array $children, array $fields): Item
    {
        $urlGenerator = $this->instantiateUrlGenerator();

        // Extract parameters into variables
        if (is_array($title)) {
            extract($title);
        }

        // If child elements provided
        if ($children) {
            $childItems = [];

            foreach ($children as $child) {
                $this->checkFormat($child);

                // If child contains child elements, use recursively add them
                if (isset($child['children']) && $child['children']) {
                    $childItems[] = $this->parseMenuItems($child['title'], $child['url'], $child['children'],
                        $child['fields'] ?? []);
                } else {
                    $childItems[] = new Item($child['title'], $child['url'], [], $child['fields'] ?? [], new Config, $urlGenerator);
                }
            }
        }

        return new Item($title, $url, $childItems ?? $children, $fields, new Config, $urlGenerator);
    }
1345833
public function createViewLink($title, $options = [])
    {
        return $this->Html->link(
            $title,
            ['action' => 'view', $this->getContext()->get($this->getViewVar('primaryKey'))],
            $options
        );
    }
1365711
public function addButton(string $title = null, array $options = []): string
    {
        if (!$title) {
            $title = __d('ck_tools', 'add');
        }
        $options = Hash::merge([
            'url' => null,
            'icon' => 'fa fa-plus',
            'class' => 'btn btn-default btn-xs btn-add',
        ], $options);
        $url = $options['url'];
        if (!$url) {
            $url = ['action' => 'add'];
            $url = $this->augmentUrlByBackParam($url);
        }
        $icon = $options['icon'];
        unset($options['url'], $options['icon']);
        if ($icon) {
            $title = '<i class="' . $icon . '"></i> ' . '<span class="button-text">' . $title . '</span>';
            $options['escape'] = false;
        }

        return $this->Html->link($title, $url, $options);
    }
175836
public function confirmationLink($title, $options)
    {
        if (!isset($options['confirm-message'])) {
            user_error('\'confirm-message\' option is not set on protectedConfirmationLink.');
            $options['confirm-message'] = '';
        }
        if (!isset($options['confirm-title'])) {
            user_error('\'confirm-title\' option is not set on protectedConfirmationLink.');
            $options['confirm-title'] = '';
        }

        $url = 'javascript:void(0)';

        $linkOptions = [
            'data-modal-header' => $options['confirm-title'],
            'data-modal-body' => '<p>' . $options['confirm-message'] . '</p>',
            'data-toggle' => 'confirm'
        ];
        unset($options['confirm-title'], $options['confirm-message']);

        if (isset($options['notify'])) {
            $linkOptions['data-modal-notify'] = $options['notify'];
            unset($options['notify']);
        }

        if (isset($options['event'])) {
            $linkOptions['data-modal-event'] = $options['event'];
            unset($options['event']);
        }

        $linkOptions = Hash::merge($linkOptions, $options);
        return $this->link($title, $url, $linkOptions);
    }
160389
public static function url($field, $title, $value = '')
    {
        return self::input($field, $title, $value, Input::TYPE_URL);
    }
28793
public function link($url, $content = '', $options = [], $safe = false)
    {
        if (is_null($content)) {
            $content = $url;
        }

        return '<a href="'.$this->_generator->generateUrl($url).'"'.self::attributes($options).'>'.self::encode($content, $safe).'</a>';
    }