|  | @@ -8,6 +8,8 @@
 | 
	
		
			
				|  |  |  use Drupal\Core\Routing\RouteMatchInterface;
 | 
	
		
			
				|  |  |  use Solarium\QueryType\Select\Query\Query;
 | 
	
		
			
				|  |  |  use Drupal\search_api\Query\QueryInterface;
 | 
	
		
			
				|  |  | +use Drupal\Core\Template\Attribute;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * Implements hook_help().
 | 
	
		
			
				|  |  |   */
 | 
	
	
		
			
				|  | @@ -48,3 +50,20 @@ function materio_sapi_search_api_solr_query_alter(Query $solarium_query,  QueryI
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + * Prepares variables for fieldset element templates.
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * Default template: fieldset.html.twig.
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * @param array $variables
 | 
	
		
			
				|  |  | + *   An associative array containing:
 | 
	
		
			
				|  |  | + *   - element: An associative array containing the properties of the element.
 | 
	
		
			
				|  |  | + *     Properties used: #attributes, #children, #description, #id, #title,
 | 
	
		
			
				|  |  | + *     #value.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +function materio_sapi_preprocess_fieldset(&$variables) {
 | 
	
		
			
				|  |  | +  if (isset($variables['element']['#legend_attributes'])) {
 | 
	
		
			
				|  |  | +    $variables['legend']['attributes'] = new Attribute($variables['element']['#legend_attributes']);
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 |