TbHtml::popover PHP Method

popover() public static method

Generates a popover.
public static popover ( string $label, string $title, string $content, array $htmlOptions = [] ) : string
$label string the popover link label text.
$title string the popover title text.
$content string the popover content text.
$htmlOptions array additional HTML attributes.
return string the generated popover.
    public static function popover($label, $title, $content, $htmlOptions = array())
    {
        $htmlOptions['rel'] = 'popover';
        $htmlOptions['data-content'] = $content;
        $htmlOptions['data-toggle'] = 'popover';
        return self::tooltipPopover($label, '#', $title, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testPopover()
 {
     $I = $this->codeGuy;
     $html = TbHtml::popover('Link', 'Heading text', 'Content text', array('class' => 'link'));
     $a = $I->createNode($html, 'a[rel=popover]');
     $I->seeNodeCssClass($a, 'link');
     $I->seeNodeAttributes($a, array('title' => 'Heading text', 'data-content' => 'Content text', 'data-toggle' => 'popover', 'href' => '#'));
     $I->seeNodeText($a, 'Link');
 }
All Usage Examples Of TbHtml::popover
TbHtml