TbHtml::tooltip PHP Method

tooltip() public static method

Generates a tooltip.
public static tooltip ( string $label, mixed $url, string $content, array $htmlOptions = [] ) : string
$label string the tooltip link label text.
$url mixed the link url.
$content string the tooltip content text.
$htmlOptions array additional HTML attributes.
return string the generated tooltip.
    public static function tooltip($label, $url, $content, $htmlOptions = array())
    {
        $htmlOptions['rel'] = 'tooltip';
        return self::tooltipPopover($label, $url, $content, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testTooltip()
 {
     $I = $this->codeGuy;
     $html = TbHtml::tooltip('Link', '#', 'Tooltip text', array('class' => 'link', 'animation' => true, 'html' => true, 'selector' => '.selector', 'placement' => TbHtml::TOOLTIP_PLACEMENT_RIGHT, 'trigger' => TbHtml::TOOLTIP_TRIGGER_CLICK, 'delay' => 350));
     $a = $I->createNode($html, 'a[rel=tooltip]');
     $I->seeNodeCssClass($a, 'link');
     $I->seeNodeAttributes($a, array('title' => 'Tooltip text', 'data-animation' => 'true', 'data-html' => 'true', 'data-selector' => '.selector', 'data-placement' => 'right', 'data-trigger' => 'click', 'data-delay' => '350', 'href' => '#'));
     $I->seeNodeText($a, 'Link');
 }
All Usage Examples Of TbHtml::tooltip
TbHtml