The backup and restore pages may display a log (if any) in a scrolling box.

@param string $loghtml Log content in HTML format
@return string HTML content that shows the log
499332
public function log_display($loghtml) {
        $out = html_writer::start_div('backup_log');
        $out .= $this->output->heading(get_string('backuplog', 'backup'));
        $out .= html_writer::start_div('backup_log_contents');
        $out .= $loghtml;
        $out .= html_writer::end_div();
        $out .= html_writer::end_div();
        return $out;
    }
168327
public function getInnerHtml()
    {
        $html = '';
        if ($content_node = $this->getFirstElmNode()) {
            $document = $content_node->ownerDocument;

            foreach ($content_node->childNodes as $node) {
                if ($this->xml_mode) {
                    $html .= $document->saveXML($node);
                } else {
                    $html .= $document->saveHTML($node);
                }
            }

            $html = $this->handleHtmlResult($html);
        }

        return $html;
    }
883188
public function getTotalsRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {
            // if no totals plan, then show dash, but keep column formatting
            if (!isset($this->totals_plan[$name])) {
                $output[] = $column->getTag('foot', '-');
                continue;
            }

            // if totals plan is set as array, then show formatted value
            if (is_array($this->totals_plan[$name])) {
                // todo - format
                $field = $this->model->getElement($name);
                $output[] = $column->getTotalsCellHTML($field, $this->totals[$name]);
                continue;
            }

            // otherwise just show it, for example, "Totals:" cell
            $output[] = $column->getTag('foot', $this->totals_plan[$name]);
        }

        return implode('', $output);
    }
355037
public function toText($html)
    {
        $parser = new Parser();

        $xmlParser = xml_parser_create();
        xml_set_element_handler($xmlParser, [$parser, 'startElement'], [$parser, 'endElement']);
        xml_set_character_data_handler($xmlParser, [$parser, 'characterData']);

        $wrappedHtml = "<root>$html</root>";
        $returnStatus = xml_parse($xmlParser, $wrappedHtml, true);

        if (!$returnStatus) {
            return $html;
        }

        return $parser->getText();
    }
809656
def html_for_check(self, check) -> str:
        """"""
        check["logs"].sort(key=lambda c: LOGLEVELS.index(c["status"]))
        logs = "<ul>" + "".join([self.log_html(log) for log in check["logs"]]) + "</ul>"
        return logs
834464
public function outerHtml() {
    if (($el = $this->getElement()) === NULL) return NULL;

    return $el->ownerDocument->saveXML($el);
  }
1000546
public function getHTML( $type = null )
	{
		$html = '';
		$param = '?v=';

		if( strpos( $this->_baseURL, '?' ) !== false ) {
			$param = '&v=';
		}

		foreach ( $this->_registeredPackages as $filetype => $packageList )
		{
			if( $type !== null && $filetype !== $type ) {
				continue;
			}

			foreach( $packageList as $package )
			{
				$packageFile = $this->_deployDir . $package->file;
				$packageFileFilesystem = $this->_basePath . $packageFile;
				$packageFileTime = 0;
				$timestamp = 0;

				if( DIRECTORY_SEPARATOR !== '/' ) {
					$packageFileFilesystem = str_replace( '/', DIRECTORY_SEPARATOR, $packageFileFilesystem );
				}

				if( is_file( $packageFileFilesystem ) ) {
					$packageFileTime = filemtime( $packageFileFilesystem );
				}

				$filesToDisplay = $this->_getFileUrls( $this->_baseURL, $this->_basePath, $param, $package, $timestamp );

				if( $packageFileTime >= $timestamp ) {
					$filesToDisplay = array( $this->_baseURL . $packageFile . $param . $packageFileTime );
				}

				$html .= $this->_createHtml( $filesToDisplay, $filetype );
			}
		}

		return $html;
	}
1357190
public function prepareHtml($html)
    {
        // if it is a real html page, we have to convert it
        if (preg_match('/<body/isU', $html)) {
            $html = $this->getHtmlFromRealPage($html);
        }

        // replace some constants
        $html = str_replace('[[date_y]]', date('Y'), $html);
        $html = str_replace('[[date_m]]', date('m'), $html);
        $html = str_replace('[[date_d]]', date('d'), $html);

        $html = str_replace('[[date_h]]', date('H'), $html);
        $html = str_replace('[[date_i]]', date('i'), $html);
        $html = str_replace('[[date_s]]', date('s'), $html);

        return $html;
    }
223464
public function html($newInnerHTML = null)
    {
        if (isset($newInnerHTML)) {
            $this->replace($newInnerHTML);
        }

        return $this->innerHTML;
    }
870756
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);

        $type = "type='checkbox'";
        $name = " name='{$this['name']}[]'";
        $ret = null;
        $checkedValues = is_array($this['checked']) ? $this['checked'] : [];

        foreach ($this['values'] as $val) {
            $id .= $val;
            $item = $onlyValue  = htmlentities($val, ENT_QUOTES, $this->characterEncoding);
            $value = " value='{$onlyValue}'";
            $checked = in_array($val, $checkedValues)
                ? " checked='checked'"
                : null;

            $ret .= <<<EOD
<p>
<input id='$id'{$type}{$class}{$name}{$value}{$autofocus}{$readonly}{$checked}{$title} />
<label for='$id'>$item</label>
{$messages}
</p>
EOD;
        }
        return <<<EOD
<div>
<p>{$label}</p>
{$ret}
<p class='cf-desc'>{$description}</p>
</div>
EOD;
    }
947109
public function log()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $this->columns = array(
            array('key' => 'Date', 'value' => \date('F j, Y')),
            array('key' => 'Time', 'value' => \date('g:ia')),
            array('key' => 'IP Address', 'value' => $_SERVER['REMOTE_ADDR']),
        );
        $typesSkip = array('button','image','reset','submit');
        $pages = $this->logGetAllPages();
        foreach (\array_keys($pages) as $i) {
            $this->setCurrentFields($i);
            foreach ($this->form->currentFields as $field) {
                $props = $field->props;
                $type = $props['attribs']['type'];
                $name = $props['attribs']['name'];
                if (\in_array($type, $typesSkip)) {
                    continue;           // not interested in these types o fields
                }
                $label = (\is_int($name) && !empty($props['label']))
                    ? $props['label']
                    : \ucwords(\strtr($name, '_', ' '));
                $value = $field->val();
                // do not use $field['return_array']... we're wanting a column for every possible value
                if (\in_array($type, array('checkbox','select','radio'))) {
                    if (\is_string($value)) {
                        $value = array($value);
                    }
                    foreach ($props['options'] as $opt) {
                        $this->logAddColumn($opt['value'], \in_array($opt['value'], $value) ? 1 : '');
                    }
                } else {
                    $value = \strtr($value, array("\n"=>' ',"\r"=>''));
                    $this->logAddColumn($label, $value);
                }
            }
        }
        $return = $this->logWriteFile();
        return $return;
    }
935583
public function convert($html) {
    if (preg_match('/^\s*$/u', $html)) {
      return '';
    }
    $html = '<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head>' . $html . '</body></html>';
    $this->dom = new \DOMDocument();
    if (!$this->dom->loadHTML($html)) {
      return NULL;
    }
    $xp = new \DOMXPath($this->dom);
    return implode(self::BLOCK_DELIMITER, $this->getBlocks(
      $xp->query('/html/body')->item(0)->childNodes
    ));
  }
738596
function _openLog()
    {

        if (!@file_exists($this->_logfile)) {

            if (!is_dir($this->_logPath) && $this->_logPath) {
                mkdir($this->_logPath, 0777, true);
            }

            $header[] = "#<?php die('Direct Access To Log Files Not Permitted'); ?>";
            $header[] = "#Date: " . date(DATE_RFC822, time());
            $header[] = "#Software: JBDump v" . self::VERSION . ' by Joomla-book.ru';
            $fields   = str_replace("{", "", self::$_config['log']['format']);
            $fields   = str_replace("}", "", $fields);
            $fields   = strtolower($fields);
            $header[] = '#' . str_replace("\t", "\t", $fields);

            $head = implode(PHP_EOL, $header);
        } else {
            $head = false;
        }

        if ($head) {
            error_log($head . PHP_EOL, 3, $this->_logfile);
        }

        return true;
    }
207935
public static function log($content)
    {
        if (is_string($content)) {
            $log = $content;
        } else {
            $log = var_export($content, true);
        }
        file_put_contents('php://stdout', $log . "\n");
    }
123451
private function prepareHtmlForDomConversion($html)
    {
        $htmlWithSelfClosingSlashes = $this->ensurePhpUnrecognizedSelfClosingTagsAreXml($html);
        $htmlWithDocumentType = $this->ensureDocumentType($htmlWithSelfClosingSlashes);

        return $this->addContentTypeMetaTag($htmlWithDocumentType);
    }
736670
public function toHtml($submitted = false, $blnSimpleLayout = false, $blnLabel = true, $blnDisplayErrors = true)
    {
        $strOutput = "";

        $intDynamicCount = $this->getDynamicCount();
        for ($intCount = 0; $intCount <= $intDynamicCount; $intCount ++) {
            $strOutput .= $this->__toHtml($submitted, $blnSimpleLayout, $blnLabel, $blnDisplayErrors, $intCount);
        }

        return $strOutput;
    }
600944
public function render($html = null) {
		$separator = $this->getSeparator();
		$result    = '';
		
		if ($this->_colgroup !== null) {
			$result .= $separator . $this->_colgroup->render();
		}
		
		if ($this->_head !== null) {
			$result .= $separator . $this->_head->render();
		}
		
		if ($this->_body !== null) {
			$result .= $separator . $this->_body->render();
		}
		
		if ($this->_foot !== null) {
			$result .= $separator . $this->_foot->render();
		}
		
		return parent::render($result . $separator);
	}