Twitter\Widgets\Buttons\PeriscopeOnAir::toHTML PHP Метод

toHTML() публичный Метод

Generate a link to a Periscope web profile configured for enhancement by the Twitter for Websites JavaScript
С версии: 1.3.0
public toHTML ( string $html_builder_class = '\Twitter\Helpers\HTMLBuilder' ) : string
$html_builder_class string callable HTML builder with a static anchorElement class
Результат string HTML markup or empty string if minimum requirements not met
    public function toHTML($html_builder_class = '\\Twitter\\Helpers\\HTMLBuilder')
    {
        // test for invalid passed class
        if (!(class_exists($html_builder_class) && method_exists($html_builder_class, 'anchorElement'))) {
            return '';
        }
        $web_profile_url = $this->getWebProfileURL();
        if (!$web_profile_url) {
            return '';
        }
        return $html_builder_class::anchorElement($web_profile_url, '@' . $this->getUsername(), array('class' => static::HTML_CLASS), $this->toArray());
    }