Erzeugt eine Überschriftzeile für Tabellen als HTML-Code.
@access		public
@static
@param		array		$heads 		Inhalte der Überschriften
@param		string		$class 		CSS Style Klasse
@return		string
550124
public static function TableHeads( $heads, $class = '', $colspan = 0 )
	{
		$cols		= array();
		$class		= $class ? " class=\"".$class."\"" : "";
		$colspan	= $colspan ? " colspan=\"".$colspan."\"" : "";
		foreach( $heads as $head )
			$cols[]	= "<th".$class.$colspan.">".$head."</th>";
		$code	= "<tr>".implode( "", $cols )."</tr>";
		return $code;
	}
67709
public function postClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes[] = 'content-node';

        $classes = apply_filters('novusopress_view_post_classes', get_post_class($classes));
        $output = sprintf('class="%s"', implode(' ', $classes));

        return apply_filters('novusopress_view_post_class_output', $output);
    }
788281
private function dumpLiteralClass(string $class): string
    {
        if (false !== strpos($class, '$')) {
            return sprintf('${($_ = %s) && false ?: "_"}', $class);
        }
        if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\{2})?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?:\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
            throw new RuntimeException(sprintf('Cannot dump definition because of invalid class name (%s)', $class ?: 'n/a'));
        }

        $class = substr(str_replace('\\\\', '\\', $class), 1, -1);

        return 0 === strpos($class, '\\') ? $class : '\\'.$class;
    }
405143
public static function menu_icon_for_class($class)
    {
        $icon = Config::inst()->get($class, 'menu_icon');
        if (!empty($icon)) {
            $iconURL = ModuleResourceLoader::resourceURL($icon);
            $class = strtolower(Convert::raw2htmlname(str_replace('\\', '-', $class)));
            return ".icon.icon-16.icon-{$class} { background-image: url('{$iconURL}'); } ";
        }
        return '';
    }
47381
public function onAdminBodyClass($class): string
    {
        $class = (string) $class;

        if (!$this->isOwn()) {
            return $class; // Not applicable.
        }
        $tab = $this->currentTab(); // Request var.
        $tab = !$tab || !$this->c::isSlug($tab) ? '' : $tab;

        $class .= ($class ? ' ' : '').$this->App::CORE_CONTAINER_SLUG.'-menu-page';
        $class .= ' '.$this->App->Config->©brand['©slug'].'-menu-page'; // App identifiers.
        $class .= $tab ? ' '.$this->App->Config->©brand['©slug'].'-menu-page-tab-'.$tab : '';

        return $class;
    }
1054267
public function addClass($class)
    {
        $current = preg_split('%\s+%', $this->getAttribute('class'), 0, PREG_SPLIT_NO_EMPTY);
        $added = preg_split('%\s+%', $class, 0, PREG_SPLIT_NO_EMPTY);
        $current = array_merge($current, $added);
        $classes = implode(' ', $current);

        $this->setAttribute('class', $classes);
    }
371307
public static function load($class)
    {
        if (substr($class, 0, 10) !== "Highlight\\") {
            return false;
        }

        $c = str_replace("\\", "/", substr($class, 10)) . ".php";
        $res = include __DIR__ . "/$c";

        return $res == 1 ? true : false;
    }
474360
public function getHeadScripts()
    {
        $output = '';
        foreach ($this->headScripts as $script) {
            $output .= $script . "\n";
        }
        $output = rtrim($output, "\n");
        return $output;
    }
67464
public function head($vars = '', $cells = '')
    {
        $html = $this->wrapUp('head')."\n\t";
        $this->head = true;
        $this->vars = (!empty($cells)) ? $this->values($cells) : array();

        return $html.$this->page->tag('tr', $this->values($vars));
    }
1348609
protected static function parseClass($class)
    {
        static $cache = array();

        if (array_key_exists($class, $cache) === false) {
            // Make reference for original input
            $string = $class;

            if ($string[0] === '\\') {
                $string = substr($string, 1);
            }

            if (preg_match('/^(?<namespace>.*)\\\\(?<className>.+?)$/', $string, $matches)) {
                $cache[$class] = array($matches['namespace'], $matches['className']);
            } else {
                $cache[$class] = array(null, $class);
            }
        }

        return $cache[$class];
    }
728157
static public function htmlClassTr($html, $css_tr) {
    $html = preg_replace_callback('@<(?<tag>[a-z]+)(?<other>\s+[^>]*)class="(?<class>[^"]+)"@s', function ($attrs) use ($css_tr) {
      $class = ' '
        . strtr($attrs['class'], array(
          "\n" => ' ',
          "\r" => ' ',
          "\t" => ' ',
        )) . ' ';
      $class = strtr($class, $css_tr['*']);
      if (isset($css_tr[$attrs['tag']])) {
        $class = strtr($class, $css_tr[$attrs['tag']]);
      }
      $class = trim($class);
      if ($class !== '') {
        $class = 'class="' . $class . '"';
      }
      return '<' . $attrs['tag'] . $attrs['other'] . $class;
    }, $html);
    return $html;
  }
1127928
public function getParentClasses(string $class, array $parents = [])
    {
        $strParent = get_parent_class($class);

        if ($strParent) {
            $parents[] = $strParent;

            $parents = $this->getParentClasses($strParent, $parents);
        }

        return $parents;
    }
893267
protected function executeStatic(string $class) : string
    {
        list($class, $method) = explode('::', $class);
        if (!class_exists($class)) {
            throw new \RuntimeException('could not find class: ' . $class);
        }
        if (!method_exists($class, $method)) {
            throw new \RuntimeException('could not find method in class: ' . $method);
        }
        ob_start();
        $class::$method();
        return (string)ob_get_clean();
    }
29655
protected function parseCssClasses($classes)
    {
        if (is_string($classes)) {
            $classes = explode(' ', $classes);
        }

        if (!is_array($classes)) {
            throw new InvalidArgumentException('CSS Class(es) must be a space-delimited string or an array');
        }

        return array_filter($classes, 'strlen');
    }
1001969
public function getLayoutForClass($class)
    {
        foreach (ClassTools::singleton()->getReverseAncestry($class) as $name) {
            
            if ($type = PageType::findByClass($name)) {
                
                if ($type->hasPageLayout()) {
                    return $type->getPageLayout();
                }
                
            }
            
            if ($name == SiteTree::class) {
                break;
            }
            
        }
    }
443365
public function hclass($classes, $raw = false)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }
        $classes = preg_split('/ +/', trim($classes));
        $classes = implode(' ', $classes);

        if ($raw) {
            return $classes;
        }

        return $classes ? ' class="' . htmlspecialchars($classes) . '"' : '';
    }
266393
public static function hasCssClass( $options, $class ) {
		if ( isset( $options['class'] ) ) {
			if ( is_array( $options['class'] ) ) {
				if ( in_array( $class, $options['class'] ) ) {
					return TRUE;
				}
			} elseif ( strpos( $options['class'], $class ) ) {
				return TRUE;
			}
		}

		return FALSE;
	}