takes an array of classes, and if they are not set on body_classes
look to see if they are set in theme config

@param string|string[] $classes
@return string
495427
public function bodyClassFunc($classes)
    {

        $header = $this->grav['page']->header();
        $body_classes = $header->body_classes ?? '';

        foreach ((array)$classes as $class) {
            if (!empty($body_classes) && Utils::contains($body_classes, $class)) {
                continue;
            }

            $val = $this->config->get('theme.' . $class, false) ? $class : false;
            $body_classes .= $val ? ' ' . $val : '';
        }

        return $body_classes;
    }
870215
public function classesToSearch($classes)
    {
        $supportedClasses = array(SiteTree::class, File::class);
        $illegalClasses = array_diff($classes, $supportedClasses);
        if ($illegalClasses) {
            throw new BadMethodCallException(
                "SearchForm::classesToSearch() passed illegal classes '" . implode("', '", $illegalClasses)
                . "'.  At this stage, only File and SiteTree are allowed"
            );
        }
        $legalClasses = array_intersect($classes, $supportedClasses);
        $this->classesToSearch = $legalClasses;
    }
270832
public function contentClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes[] = sprintf('main-%s', $this->template);
        $classes[] = 'main-content';

        if (is_active_sidebar(sprintf('sidebar-%s', $this->template))) {
            $classes[] = 'col-sm-8 col-md-9';
        } else {
            $classes[] = 'col-sm-12';
        }

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

        return apply_filters('novusopress_view_content_class_output', $output);
    }
1251918
public function toggleClasses( array $classes, $toggle = null ) {
		if ( $toggle === null ) {
			$this->classes = array_diff(
				array_merge( $this->classes, $classes ),
				array_intersect( $this->classes, $classes )
			);
		} elseif ( $toggle ) {
			$this->classes = array_merge( $this->classes, $classes );
		} else {
			$this->classes = array_diff( $this->classes, $classes );
		}
		return $this;
	}
503055
public function addClass($classes)
    {
        $classes = (array)$classes;
        foreach ($classes as $class) {
            if (class_exists($class) || interface_exists($class)) {
                $this->classes[] = $class;
            } else {
                echo "Class not exists: $class\r\n";
            }
        }
    }
120828
private function loadClassTraits(array $classes)
    {
        $hierarchy = [];

        foreach ($classes as $class) {
            $traits = $this->loadTraits($class->getTraits());

            // Reverse the order of the traits list, (deepest becomes first as later traits overwrite).
            // And add them before the class (class overwrites traits).
            $hierarchy = array_merge($hierarchy, array_reverse($traits));
            $hierarchy[] = $class->name;
        }

        return $hierarchy;
    }
465757
public function updateClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        // Apply Background Color:
        
        if ($class = $this->owner->ColorBackgroundTheme) {
            $classes[] = $this->style($class);
        }
        
        // Apply Foreground Color:
        
        if ($class = $this->owner->ColorForegroundTheme) {
            $classes[] = $this->style($class);
        }
        
        // Apply Border Color:
        
        if ($class = $this->owner->ColorBorderTheme) {
            $classes[] = $this->style($class);
        }
    }
1156300
public function registerPrefixes(array $classes)
    {
        foreach ($classes as $prefix => $locations) {
            $this->prefixes[$prefix] = (array) $locations;
        }
    }
641386
public function updateClassNames(&$classes)
    {
        if ($position = $this->owner->Position) {
            $classes[] = $this->style('position', $position);
        }
    }
485195
public static function parseRelationClass($class)
    {
        // detect many many through syntax
        if (is_array($class)
            && array_key_exists('through', $class)
            && array_key_exists('to', $class)
        ) {
            $toRelation = $class['to'];

            $hasOne = Config::inst()->get($class['through'], 'has_one');
            if (empty($hasOne) || !is_array($hasOne) || !array_key_exists($toRelation, $hasOne)) {
                return $class;
            }

            return $hasOne[$toRelation];
        }

        return $class;
    }
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);
    }
962304
public function updateCMSTreeClasses(&$classes)
    {
        if ($this->owner->getField('Disabled')) {
            $classes .= ' is-disabled';
        } elseif ($this->owner->getField('Cached')) {
            $classes .= ' is-cached';
        }
    }
952017
public function Classes(){
        $classes = array($this->config()->get('base_class'));
        if ($this->Style) {
            $classes[] = strtolower($this->Style).'-'.strtolower(preg_replace('/([a-z]+)([A-Z0-9])/', '$1-$2', get_called_class()));
        }else{
            $classes[] = strtolower(preg_replace('/([a-z]+)([A-Z0-9])/', '$1-$2', get_called_class()));
        }
        return implode(' ',$classes);
    }
902095
public function generateCommands(array $classes = null)
    {
        if (!isset($classes)) {
            $classes = array();
        }
        $path = dirname(__DIR__) . '/Api';

        if (\Phar::running(false)) {
            $iterator = new \Phar($path);
        } else {
            $iterator = new \DirectoryIterator($path);
        }

        foreach ($iterator as $file) {
            if (fnmatch('*.php', $file->getPathName())) {
                $classes[] = Application::API_NAMESPACE . basename($file, '.php');
            }
        }

        $commands = array();

        foreach ($classes as $class) {
            $api = new \ReflectionClass($class);
            if ($api->isAbstract()) {
                // skip abtract classes
                continue;
            }

            foreach ($api->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
                if (strstr($method->getName(), '__')) {
                    // skip magics
                    continue;
                }
                $commands[] = $this->generateCommand(strtolower($api->getShortName()), $method);
            }
        }
        return $commands;
    }
1348260
protected function calculateClassVar($data, $classes)
    {
        // s is an n (number of classes) by m (number of column) matrix
        $s = array_fill(0, count($data[0]), array_fill(0, count($data[0]), 0));
        $sW = new Matrix($s, false);

        foreach ($data as $index => $row) {
            $label = array_search($classes[$index], $this->labels);
            $means = $this->means[$label];

            $row = $this->calculateVar($row, $means);

            $sW = $sW->add($row);
        }

        return $sW;
    }
1365568
public function getCreateSchemaSql(array $classes)
    {
        $schema = $this->getSchemaFromMetadata($classes);

        return $schema->toSql($this->platform);
    }
1372995
public function bodyClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes = get_body_class($classes);

        if (Framework::instance()->getThemeOption('navbar_location') === 'fixed') {
            $classes[] = 'fixed-nav';
        }

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

        return apply_filters('novusopress_view_body_class_output', $output);
    }