The standard tags (typically skip links) that should be output just inside
the start of the <body> tag. Designed to be called in theme layout.php files.

@return string HTML fragment.
436658
public function standard_top_of_body_html() {
        global $CFG;
        $output = $this->page->requires->get_top_of_body_code($this);
        if ($this->page->pagelayout !== 'embedded' && !empty($CFG->additionalhtmltopofbody)) {
            $output .= "\n".$CFG->additionalhtmltopofbody;
        }

        // Give subsystems an opportunity to inject extra html content. The callback
        // must always return a string containing valid html.
        foreach (\core_component::get_core_subsystems() as $name => $path) {
            if ($path) {
                $output .= component_callback($name, 'before_standard_top_of_body_html', [], '');
            }
        }

        // Give plugins an opportunity to inject extra html content. The callback
        // must always return a string containing valid html.
        $pluginswithfunction = get_plugins_with_function('before_standard_top_of_body_html', 'lib.php');
        foreach ($pluginswithfunction as $plugins) {
            foreach ($plugins as $function) {
                $output .= $function();
            }
        }

        $output .= $this->maintenance_warning();

        return $output;
    }
294007
public function getHtml(): string
  {
    if (!isset($this->attributes['action']))
    {
      $this->attributes['action'] = Abc::$request->getRequestUri();
    }

    $this->prepare();

    $html = $this->getHtmlStartTag();

    $html .= $this->getHtmlBody();

    $html .= $this->getHtmlEndTag();

    return $html;
  }
592036
protected function outputOpeningTag()
    {
        echo '<', htmlspecialchars($this->_tag);
        foreach ($this->_attributes as $name => $value) {
            echo ' ', htmlspecialchars($name), '="', htmlspecialchars($value), '"';
        }
        echo '>';
        if ($this->_tag == 'html' || $this->_tag == 'head' || $this->_tag == 'body') {
            echo "\n";
        }
    }
957969
public function highlightsToString()
    {
        $out = ''; $i = 0;
        $tags = \Yii::$app->params['common']['highlights'];
        foreach($this->highlights as $highlight) {
            $out .= '<'. $tags[$i] .'>'. $this->replace_slash($highlight) .'</'. $tags[$i++] .'>';
        }
        return $out;
    }
1046668
public function getTagsList()
    {
        $tags = explode("\n", str_replace("\r", "\n", trim($this->getTags())));
        $clean_tags = [];
        foreach ($tags as $tag) {
            $tag = trim($tag);
            if ($tag !== '') {
                $clean_tags[] = $tag;
            }
        }

        return $clean_tags;
    }
1312925
public function parentTag(): ?string
    {
        switch ($this->attributes['list']) {
            case Options::ATTRIBUTE_LIST_ORDERED:
                return Options::HTML_TAG_LIST_ORDERED;
                break;
            case Options::ATTRIBUTE_LIST_BULLET:
                return Options::HTML_TAG_LIST_UNORDERED;
                break;

            default:
                return Options::HTML_TAG_LIST_UNORDERED;
                break;
        }
    }
232312
public function toHtml()
    {
        $this->detectOtherValues();

        $html = '';
        $html .= "<{$this->mainPaginationTag} class=\"{$this->mainCssClass}\">";
        $html .= $this->getHtml4FirstPage();
        $html .= $this->getHtml4PreviousPage();
        $html .= $this->getHtml4Pages();
        $html .= $this->getHtml4NextPage();
        $html .= $this->getHtml4LastPage();
        $html .= "</{$this->mainPaginationTag}>";

        return $html;
    }
1242452
protected function getHtmlBody()
    {
        $charset    = $this->isUtf8($this->body['text/html']) ? 'utf-8' : 'US-ASCII';
        $html       = str_replace("\r", '', trim($this->body['text/html']));

        $encoded = explode("\n", $this->quotedPrintableEncode($html));
        $body   = array();
        $body[] = 'Content-Type: text/html; charset='.$charset;
        $body[] = 'Content-Transfer-Encoding: quoted-printable'."\n";

        foreach ($encoded as $line) {
            $body[] = $line;
        }

        $body[] = null;
        $body[] = null;

        return $body;
    }
1018703
public function outputHtml()
    {
        $result = '';
        if (!is_null($this->dom)) {
            //SaveXML : <br/><img/>
            //SaveHTML: <br><img>
            $result = trim($this->dom->saveXML($this->getRealElement()));
            $result = str_replace($this->TEMP_CONTENT, '', $result);
            $parentTagNameLength = strlen($this->PARENT_TAG_NAME);
            $result = substr($result, $parentTagNameLength + 2, -($parentTagNameLength + 3));
        }
        return $result;
    }
637505
protected function getBody()
    {
        $type = 'Plain';
        if (count($this->body) > 1) {
            $type = 'Alternative';
        } else if (isset($this->body['text/html'])) {
            $type = 'Html';
        }

        $method = 'get%sBody';
        if (!empty($this->attachments)) {
            $method = 'get%sAttachmentBody';
        }

        $method = sprintf($method, $type);

        return $this->$method();
    }
484497
protected function getFormTag()
    {
        $form_tag = new SwatHtmlTag('form');

        $form_tag->addAttributes(array(
            'id' => $this->id,
            'method' => $this->method,
            'enctype' => $this->encoding_type,
            'accept-charset' => $this->accept_charset,
            'action' => $this->action,
            'class' => $this->getCSSClassString()
        ));

        // we're going to validate data on the server, so turn off HTML5
        // form validation
        $form_tag->novalidate = 'novalidate';

        return $form_tag;
    }
885661
private function getAbout()
    {
        $html = $this->_parser->find('#content table tr', 0)->find('td', 0)->next_sibling();

        preg_match('/(<div class="normal_header" style="height: 15px;">).*(<div class="normal_header">)/', $html, $about);

        $html = $html->find('div[class=normal_header]', 0);
        $about = str_replace($html->outertext, '', $about[0]);
        $about = str_replace('<div class="normal_header">', '', $about);

        preg_match('/(No biography written)/', $about, $temp_about);
        if (!$temp_about) {
            $about = str_replace(['<br>', '<br />', '  '], ["\n", "\n", ' '], $about);
            $about = strip_tags($about);

            return preg_replace('/\n[^\S\n]*/', "\n", $about);
        } else {
            return;
        }
    }
889488
public function getMsgBody()
    {
        $body = null;

        if (!empty($this->_parts)) {
            if (count($this->_parts) > 1) {
                foreach ($this->_parts as $part) {
                    if ($part->contentType != Content::CT_TEXT_PLAIN && $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_ALTERNATIVE) {
                        $body = $part->getContentDecode();
                        break;
                    }

                    $body .= PHP_EOL.$part->getContentDecode();
                }
            } else {
                $body = $this->_parts[0]->getContentDecode();
            }
        }

        return $body;
    }
710422
public function render()
    {
        if ($this->isSelfClosing) {
            $element = "<{$this->tag}".$this->getAttributesString()." />";
        } else {
            $element = "<{$this->tag}".$this->getAttributesString().">".$this->getInnerHtml()."</{$this->tag}>";
        }
        $before = !empty($this->before) ? implode(PHP_EOL, $this->before) : '';
        $after  = !empty($this->after) ? implode(PHP_EOL, $this->after) : '';

        return $before . $element . $after;
    }
616790
public function getTag() : ?string 
    {
        if ( ! $this->hasTag()) {
            $this->setTag($this->getDefaultTag());
        }
        return $this->tag;
    }
1336569
protected function getHtmlAttachmentBody()
    {
        $html   = $this->getHtmlBody();

        $body = array();
        $body[] = 'Content-Type: multipart/mixed; boundary="'.$this->boundary[1].'"';
        $body[] = null;
        $body[] = '--'.$this->boundary[1];

        foreach ($html as $line) {
            $body[] = $line;
        }

        return $this->addAttachmentBody($body);
    }
1271055
public function getCurrentTag() : string
    {
        $cmd    = new GetCurrentTag($this->repo->getRoot());
        $result = $this->runner->run($cmd);

        return trim($result->getStdOut());
    }