original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: takes an array of classes and if they are not set on body_classes look to see if they are set in theme config