Initial Drupal 11 with DDEV setup
This commit is contained in:
		@ -0,0 +1,5 @@
 | 
			
		||||
name: Views test checkboxes theme
 | 
			
		||||
type: theme
 | 
			
		||||
base theme: stable9
 | 
			
		||||
description: Theme for testing Views rendering of checkboxes.
 | 
			
		||||
version: VERSION
 | 
			
		||||
@ -0,0 +1,22 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Changes an exposed "type" filter from a multi-select to checkboxes.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
use Drupal\Core\Form\FormStateInterface;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Changes an exposed "type" filter from a multi-select to checkboxes.
 | 
			
		||||
 */
 | 
			
		||||
function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state): void {
 | 
			
		||||
  if (isset($form['type'])) {
 | 
			
		||||
    $form['type']['#type'] = 'checkboxes';
 | 
			
		||||
  }
 | 
			
		||||
  if (isset($form['tid'])) {
 | 
			
		||||
    $form['tid']['#type'] = 'checkboxes';
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,13 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override for an 'input' #type form element.
 | 
			
		||||
 *
 | 
			
		||||
 * Available variables:
 | 
			
		||||
 * - attributes: A list of HTML attributes for the input element.
 | 
			
		||||
 * - children: Optional additional rendered elements.
 | 
			
		||||
 *
 | 
			
		||||
 * @see template_preprocess_input()
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
<button{{ attributes }}>attributes.value</button>{{ children }}
 | 
			
		||||
@ -0,0 +1,11 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override to display all the fields in a views row.
 | 
			
		||||
 *
 | 
			
		||||
 * The reason for this template is to override the theme function provided by
 | 
			
		||||
 * views to allow tests to run against the twig template.
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{% include '@views/views-view-field.html.twig' %}
 | 
			
		||||
Use posts instead of twigs to protect your llamas from escaping the field.
 | 
			
		||||
@ -0,0 +1,11 @@
 | 
			
		||||
{#
 | 
			
		||||
/**
 | 
			
		||||
 * @file
 | 
			
		||||
 * Theme override to display all the fields in a views row.
 | 
			
		||||
 *
 | 
			
		||||
 * The reason for this template is to override the theme function provided by
 | 
			
		||||
 * views.
 | 
			
		||||
 */
 | 
			
		||||
#}
 | 
			
		||||
{% include '@views/views-view-fields.html.twig' %}
 | 
			
		||||
May the force be with you!
 | 
			
		||||
@ -0,0 +1,5 @@
 | 
			
		||||
name: Views test theme
 | 
			
		||||
type: theme
 | 
			
		||||
base theme: stable9
 | 
			
		||||
description: Theme for testing Views functionality.
 | 
			
		||||
version: VERSION
 | 
			
		||||
		Reference in New Issue
	
	Block a user