Add a body class with page slug if existing.

@param array $classes Classes
330541
public static function addBodyClass(array $classes)
    {
        if (is_single() || is_page() && !is_front_page()) {
            if (!in_array(basename(get_permalink()), $classes)) {
                $classes[] = basename(get_permalink());
            }
        }

        return $classes;
    }
1026837
public function attachPearPrefixes(array $classes)
    {
        foreach ($classes as $prefix => $paths) {
            $this->attachPearPrefix($prefix, $paths);
        }
        return $this;
    }
224333
public function classes(array $classes) : Element
    {
        $this->classes = array_merge($this->classes, $classes);

        return $this;
    }
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);
    }
558866
public function import_classes( $data ) {
		if ( is_array($data) ) {
			$data = (object) $data;
		}
		$this->classes = array_merge($this->classes, $data->classes);
		$this->classes = array_unique($this->classes);
		$this->classes = apply_filters('nav_menu_css_class', $this->classes, $this, array(), 0);
		$this->class = trim(implode(' ', $this->classes));
	}
397716
public static function addCssClass(&$options, $class)
    {
        if (isset($options['class'])) {
            $classes = ' ' . $options['class'] . ' ';
            if (($pos = strpos($classes, ' ' . $class . ' ')) === false) {
                $options['class'] .= ' ' . $class;
            }
        } else {
            $options['class'] = $class;
        }
    }
630159
public function updateClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        if ($class = $this->owner->PaginationSizeClass) {
            $classes[] = $class;
        }
        
        if ($class = $this->owner->PaginationButtonModeClass) {
            $classes[] = $class;
        }
    }
318954
public function setClass($class)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setClass($class);
        }
    }
745624
protected function compileGroupClasses($name, array $classes)
    {
        $path = "{$this->path}/{$name}";

        if (! $this->files->isDirectory($path)) {
            return ;
        }

        foreach ($classes as $class) {
            $file = "{$path}/{$class}.php";

            if ($this->files->exists($file)) {
                $this->collection['added'][] = $file;
            } else {
                $this->collection['missing'][] = $file;
            }
        }
    }
809196
public function wrapperClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes[] = 'wrapper';
        $classes[] = sprintf('template-%s', $this->template);

        if (is_active_sidebar(sprintf('sidebar-%s', $this->template))) {
            $classes[] = 'active-sidebar';
        }

        if (has_nav_menu('main-menu')) {
            $classes[] = 'active-main-menu';
        }

        if (is_active_sidebar('header-widgets')) {
            $classes[] = 'active-header-widgets';
        }

        $i = 0;
        if (is_active_sidebar('footer-one')) $i++;
        if (is_active_sidebar('footer-two')) $i++;
        if (is_active_sidebar('footer-three')) $i++;
        if (is_active_sidebar('footer-four')) $i++;

        switch ($i) {
            case 1:
                $classes[] = 'active-footers-one';
                break;
            case 2:
                $classes[] = 'active-footers-two';
                break;
            case 3:
                $classes[] = 'active-footers-three';
                break;
            case 4:
                $classes[] = 'active-footers-four';
                break;
            default:
                break;
        }

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

        return apply_filters('novusopress_view_wrapper_class_output', $output);
    }
615292
public function setAuthClass($class)
  {
    $prev = $this->configuration['auth_class'];
    if (!isset($this->configuration['classes'][$class]) &&
        isset($this->configuration['classes'][$prev])) {
      $this->configuration['classes'][$class] =
          $this->configuration['classes'][$prev];
    }
    $this->configuration['auth_class'] = $class;
  }
635581
public function import(array $classes)
    {
        foreach ($classes as $class => $alias) {
            if (is_integer($class)) {
                $class = $alias;
                $alias = ClassHelper::getSimpleName($class);
            }
            if (isset($this->imports[$alias])) {
                throw new \RuntimeException("Alias $alias for $class exists, previous is "
                                            . $this->imports[$alias]);
            }
            $this->imports[$alias] = $class;
        }
        return $this;
    }
220313
public void addClasses(Set<Class<?>> classes) {
        for (Class<?> classToAdd: classes) {
            localClassCache.put(classToAdd.getName(), classToAdd);
        }
    }
683698
public function addClass(?string $class): void
  {
    // If class is empty return immediately.
    if ($class===null || $class==='') return;

    if (isset($this->attributes['class']))
    {
      $this->attributes['class'] .= ' ';
      $this->attributes['class'] .= $class;
    }
    else
    {
      $this->attributes['class'] = $class;
    }
  }
369297
public function addHeader($class = 'Menu_Objective')
    {
        $this->header_wrap = $this->add('View', null, 'Header', array('layout/fluid', 'Header'));
        /** @type View $this->header_wrap */

        $this->header = $this->header_wrap->add($class, null, 'Header_Content');

        return $this->header;
    }
505631
public function registerSubRoutes(array $classes)
    {
        foreach ($classes as $key => $class) {
            if (is_array($class)) {
                if ($this->usableClass($key)) {
                    $this->registerAdminRoutes($key);
                }

                $this->registerSubRoutes($class);
                continue;
            }
            $this->registerAdminRoutes($class);
        }
    }
543247
public function addClassLocations(array $references)
    {
        foreach ($references as $referenced_member_id => $locations) {
            if (isset(self::$class_locations[$referenced_member_id])) {
                self::$class_locations[$referenced_member_id] = array_merge(
                    self::$class_locations[$referenced_member_id],
                    $locations
                );
            } else {
                self::$class_locations[$referenced_member_id] = $locations;
            }
        }
    }