Display custom button for Login

@access public
@param string $title Title of link
@param string $url Redirect url
@param array $attributes Attributes of link
@return string Link of button for login
490210
public static function customButton($title, $url, $attributes = array())
    {
        // configuration
        $config = self::config();

        // no configuration file
        if (!$config) {
            return null;
        }

        $attributes = Helpers::addClass($attributes, "clef");

        return '<a href="https://clef.io/iframes/qr?app_id='.$config['app_id'].'&amp;redirect_url='.$url.'" '.\HTML::attributes($attributes).'>'.$title.'</a>';
    }
102808
public function link($url, $name, $position="BL", $attributes=array())
    {
        $base = str_replace(Request::path(),'',strtok(Request::fullUrl(),'?'));
        $match_url = str_replace($base, '/', strtok($url,'?'));
        if (Request::path()!= $match_url) {
            $url = Persistence::get($match_url, parse_url($url, PHP_URL_QUERY));
        }


        $attributes = array_merge(array("class"=>"btn btn-default"), $attributes);
        $this->button_container[$position][] =  HTML::link($url, $name, $attributes);
        $this->links[] = $url;

        return $this;
    }
374656
public function button(string $title, $url = false, array $options = []): string
    {
        $options = Hash::merge([
            'icon' => 'arrow-right',
            'class' => 'btn btn-default btn-xs',
            'additionalClasses' => '',
        ], $options);

        $options['class'] .= ' ' . $options['additionalClasses'];
        if ($options['icon']) {
            $title = '<i class="fa fa-' . $options['icon'] . '"></i> ' . $title;
            $options['escape'] = false;
        }
        unset($options['additionalClasses'], $options['icon']);

        return $this->Html->link($title, $url, $options);
    }
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);
	}
40374
public function postActionAllButton($title, $url, array $options = array())
    {
        $default_options = ['class'        => 'btn btn-default btn-xs action_all_btn',
                            'disabled'     => 'disabled',
                            'unlockFields' => ['checked_ids'],
                            'data-confirm' => null
                           ];

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

        $options = array_merge($default_options, $options);

        $html = $this->postButton($title, $url, $options);

        return $html;
    }
663502
public function setUrl($url, $url_title = null) {
		if ($url == '') throw new \InvalidArgumentException('url parameter is empty');
		$this->url = $url;
		$this->url_title = $url_title;
	}
490067
public static function cancel($title = null, $url = null, array $options = [])
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $options += [
            'icon'      => 'close',
            'iconClass' => 'ckTextRed',
            'button'    => 'grey lighten-3'
        ];

        if (empty($url)) {
            $url = ['action' => 'index'];
        }

        $title = (empty($title)) ? __d('core', 'Cancel') : $title;

        $toolbar->appendButton('Core.link', $title, $url, $options);
    }
1371427
public function addPath($title, $url=NULL) {
		
		$path			= new \stdClass();
		$path->title	= $title;
		$path->url		= $url;
		$path->active	= TRUE;

		// just last active path will remains active
		foreach ($this->paths as $p) {
			$p->active = FALSE;
		}
		
		$this->paths[]	= $path;
		
		return $this;
	
	}
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);
    }
1256797
public function url(string $url, string $title, int $order = null, string $icon = null, array $attributes = [])
    {
        return $this->add(compact('url', 'title', 'order', 'icon', 'attributes'));
    }
132134
public function url($url, $title = null)
    {
        $this->url = $url;
        $this->urlTitle = $title;

        return $this;
    }
1206087
public function secureLink($url, $title = null, $attributes = array())
	{
		return $this->link($url, $title, $attributes, true);
	}
73812
public function dropdown($title, $url, \Closure $callback, $order = 0, array $attributes = array())
    {
        $properties = compact('title', 'url', 'order', 'attributes');

        if (func_num_args() == 4) {
            $arguments = func_get_args();

            $title = array_get($arguments, 0);
            $attributes = array_get($arguments, 3);

            $properties = compact('title', 'attributes');
        }

        $child = static::make($properties);

        call_user_func($callback, $child);

        $this->childs[] = $child;

        return $child;
    }
564596
public function link($routes, $url, $value = '', $attributes = array('class' => 'active'))
	{
		if(empty($value))
		{
			$value = $url;
		}

		$output = '<a href="'.$url.'"';

		if($this->is($routes))
		{
			$output.= $this->putAttributes($attributes);
		}

		$output.= '>'.$value.'</a>';

		return $output;
	}
88140
public function anchor(String $url, String $value = NULL, Array $attributes = []) : String
    {
        if( ! IS::url($url) && strpos($url, '#') !== 0 )
        {
            $url = Request::getSiteURL($url);
        }

        $attributes['href'] = $url;

        return $this->_multiElement('a', $value ?? $url, $attributes);
    }
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;
	}
366243
public function dialogBackButton(string $title = null): string
    {
        $button = '<button class="modal-back btn btn-default btn-xs">';
        $button .= '<i class="fa fa-fw fa-arrow-left"></i>';
        $button .= $title ?? __('back');
        $button .= '</button>';

        return $button;
    }