Create a popover and it's link

@param string $content Content of the popover
@param string $label The label for the link that'll call the popover
@param string $placement top|bottom|left|right
@param string $title
@param string $class
@return string
508984
public static function popover($content, $label, $placement = 'top', $title = null, $class = null) {
        ob_start();
        ?>
        <a href="#" class="<?= $class ?>" rel="popover" data-placement="<?= $placement ?>"
           data-content='<?= $content ?>' <?=
           $title ? ' data-original-title="' .
                   $title . '"' : ''
           ?>><?= $label ?></a>
           <?php if (self::$addPopoverJs): ?>
            <script>
                $(document).ready(function () {
                    $('a[rel="popover"]').popover({
                        html: true
                    });
                });
            </script>
            <?php
        endif;
        return ob_get_clean();
    }
551851
public static function tooltip($label, $url, $content, $htmlOptions = array())
    {
        $htmlOptions['rel'] = 'tooltip';
        return self::tooltipPopover($label, $url, $content, $htmlOptions);
    }
1210338
public function addElement($title, $description, $image = '')
    {
        $element = new Element($title, $description, $image);
        $this->add($element);

        return $element;
    }
1244901
public function title($title, $url = null)
    {
        $this->title = $title;
        $this->url = $url;

        return $this;
    }
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>';
    }
913367
public function text($field, $label) {
        $element = new Text($this->_entity, $field, $label);
        array_push($this->_elements, $element);

        return $element;
    }
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
        );
    }
1027792
public function html($title = null, $alt = null, $class = null, $id = null, $reset = true)
    {
        $element = $this->parsedownElement($title, $alt, $class, $id, $reset);

        if (!$this->parsedown) {
            $this->parsedown = new Parsedown(null, null);
        }

        return $this->parsedown->elementToHtml($element);
    }
1363059
public function tooltip(String $placement, $content = NULL, Bool $html = NULL)
    {
        if( is_string($content) )
        {
            return $this->title($content)->dataHtml($html === true ? 'true' : $html)->dataToggle('tooltip')->dataPlacement($placement);
        }
        
        return $this->usePropertyOptions($placement, $content, __FUNCTION__);
    }
55928
public function renderContent($content, $title = null)
    {
        if ($content instanceof Renderable) {
            $content = $content->render();
        }

        return $this->admin->template()->view('_layout.inner')
            ->with('title', $title)
            ->with('content', $content)
            ->with('breadcrumbKey', $this->parentBreadcrumb);
    }
552380
public function createLink($label, $href = null)
    {
        if ( ! $this->attributes->hasAttributeClass('lead')) {
            $this->attributes->addAttributeClass('lead');
        }

        $link = new Link($label, $href);
        $link->attributes->addAttributeClass(['btn', 'btn-primary', 'btn-lg']);
        $this->childNodes->push($link);

        return $this->childNodes->last();
    }
1328383
public function createAddon($node = null, $position = Group\AddOn::ADDON_LEFT)
    {
        $addOn = new Group\AddOn($position);

        if (isset($node)) {
            if ($node instanceof Element) {
                $addOn->childNodes->push($node);
            } else {
                $addOn->textContent->push($node);
            }
        }

        $this->addOns->push($addOn);

        return $this->addOns->last();
    }
1279200
public function build($id = '', $class = '', $content = null, $title = 'Window Frame')
    {
        // Set basic properties
        $this->type(Popup::TP_PERSISTENT, false);
        $this->binding('on');

        // Create wFrame
        $id = 'wf_' . (empty($id) ? mt_rand() : $id);
        $this->wFrame = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', $id, 'window-frame');
        $this->wFrame->addClass($class);

        // Build parent element and append content to frame
        parent::build($id, $this->wFrame);

        // Create header
        $frameHeader = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'frame-header');
        $this->appendToFrame($frameHeader);

        // Header Title
        $frameTitle = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('span', $title, '', 'frame-title');
        $frameHeader->append($frameTitle);

        // Close button
        $closeBtn = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('span', '', '', 'button-close');
        $frameHeader->append($closeBtn);

        // Create body
        $this->body = $this->getHTMLDocument()->getHTMLFactory()->buildHtmlElement('div', '', '', 'frame-body');
        $this->appendToFrame($this->body);

        // Append given content to frame body, if any
        $this->appendToBody($content);

        return $this;
    }
989269
public function addPresentation($nameOrUrl, $content = null, $filename = null)
    {
        if (!$filename) {
            $this->presentations[$nameOrUrl] = !$content ?: base64_encode($content);
        } else {
            $this->presentations[$nameOrUrl] = $filename;
        }

        return $this;
    }
656173
public function create( $title = null, $content = null )
    {
        $post = wp_insert_post(array(
            'post_type'    => $this->postType,
            'post_title'   => $title,
            'post_content' => $content,
            'post_status'  => 'draft',
        ));

        return new static($post);
    }
903902
public function message($title, $text = null)
    {
        if (!in_array($this->type, ['success', 'error', 'info', 'warning'])) {
            return '';
        }
        $container = $this->assetFactory->container(self::position);
        $type      = $this->resolveType();
        return $container->inlineScript('swal-message', $this->inline($type, $title, $text));
    }
164919
public function link($link, $text=null, $title=null, $popup=false, $class=null) {
		if (is_null($text)) {
			// if no text is given, we use the text originally provided by the user
			$text = $link;
		}

		// deal with internal and (slightly) malformed links
		$link = $this->getLink($link);

		$attributes = $this->getHtmlAttributes(array(
			'title'=>$title,
			'target'=>$this->isTrue($popup)?"blank":null,
			'class'=>$class
		));

		return "<a href='$link'$attributes>$text</a>";
	}