TbHtml::tooltipPopover PHP Method

tooltipPopover() protected static method

Generates a base tooltip.
protected static tooltipPopover ( string $label, mixed $url, string $title, array $htmlOptions ) : string
$label string the tooltip link label text.
$url mixed the link url.
$title string the tooltip title text.
$htmlOptions array additional HTML attributes.
return string the generated tooltip.
    protected static function tooltipPopover($label, $url, $title, $htmlOptions)
    {
        $htmlOptions['title'] = $title;
        if (TbArray::popValue('animation', $htmlOptions)) {
            $htmlOptions['data-animation'] = 'true';
        }
        if (TbArray::popValue('html', $htmlOptions)) {
            $htmlOptions['data-html'] = 'true';
        }
        $selector = TbArray::popValue('selector', $htmlOptions);
        if (!empty($selector)) {
            $htmlOptions['data-selector'] = $selector;
        }
        $placement = TbArray::popValue('placement', $htmlOptions);
        if (!empty($placement)) {
            $htmlOptions['data-placement'] = $placement;
        }
        $trigger = TbArray::popValue('trigger', $htmlOptions);
        if (!empty($trigger)) {
            $htmlOptions['data-trigger'] = $trigger;
        }
        if (($delay = TbArray::popValue('delay', $htmlOptions)) !== null) {
            $htmlOptions['data-delay'] = $delay;
        }
        return self::link($label, $url, $htmlOptions);
    }
TbHtml