Skip to content
Snippets Groups Projects
Commit 0c7c5a87 authored by Eric Smith's avatar Eric Smith
Browse files

Merge branch '3473697-add--.gitlab-ci.yml' into '2.x'

Issue #3473697: Add .gitlab-ci.yml file from template

See merge request !2
parents 2ce706a4 be141051
No related branches found
No related tags found
No related merge requests found
Pipeline #280505 passed with warnings
################
# GitLabCI template for Drupal projects.
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification.
# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your
# pipelines automatically. However, you can modify this template if you have additional needs for your project.
# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/
################
# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/
# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml
include:
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- "/includes/include.drupalci.main.yml"
- "/includes/include.drupalci.variables.yml"
- "/includes/include.drupalci.workflows.yml"
################
# Pipeline configuration variables are defined with default values and descriptions in the file
# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
# Uncomment the lines below if you want to override any of the variables. The following is just an example.
################
# variables:
# SKIP_ESLINT: '1'
# OPT_IN_TEST_NEXT_MAJOR: '1'
# _CURL_TEMPLATES_REF: 'main'
variables:
_CSPELL_WORDS: 'dman, Multipage'
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace Drupal\chunker\Plugin\Field\FieldFormatter; namespace Drupal\chunker\Plugin\Field\FieldFormatter;
use Drupal\Component\Utility\Html;
use Drupal\Core\Field\FormatterBase; use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Component\Utility\Html;
/** /**
* Plugin implementation of the 'Chunker' formatter. * Plugin implementation of the 'Chunker' formatter.
...@@ -145,7 +145,7 @@ class ChunkerFormatter extends FormatterBase { ...@@ -145,7 +145,7 @@ class ChunkerFormatter extends FormatterBase {
$dom = Html::load($text); $dom = Html::load($text);
// Html load wraps text in <body>, so lets pull out the body element. // Html load wraps text in <body>, so lets pull out the body element.
$bodies = $dom->getElementsByTagName('body'); $bodies = $dom->getElementsByTagName('body');
/* @var $scope DOMElement */ /** @var \DOMElement $scope */
$scope = $bodies->item(0); $scope = $bodies->item(0);
// To get it all sorted, recursively re-run the process for several depths. // To get it all sorted, recursively re-run the process for several depths.
...@@ -158,7 +158,7 @@ class ChunkerFormatter extends FormatterBase { ...@@ -158,7 +158,7 @@ class ChunkerFormatter extends FormatterBase {
} }
/** /**
* Create div-based sections around document contents based on headings, e.g. h2s. * Create sections around document contents based on headings, e.g. h2s.
*/ */
public function enwrap($scope, $start_level, array $settings) { public function enwrap($scope, $start_level, array $settings) {
...@@ -179,7 +179,7 @@ class ChunkerFormatter extends FormatterBase { ...@@ -179,7 +179,7 @@ class ChunkerFormatter extends FormatterBase {
$current_section_content = $scope; $current_section_content = $scope;
// Jiggling the domnodelist in realtime confuses PHP tragically. // Jiggling the domnodelist in realtime confuses PHP tragically.
// Enumerate the childnodes into a simpler array before moving them around;. // Enumerate the child nodes into a simpler array before moving them around.
$child_nodes = []; $child_nodes = [];
foreach ($scope->childNodes as $item) { foreach ($scope->childNodes as $item) {
$child_nodes[] = $item; $child_nodes[] = $item;
...@@ -238,7 +238,7 @@ class ChunkerFormatter extends FormatterBase { ...@@ -238,7 +238,7 @@ class ChunkerFormatter extends FormatterBase {
if (!empty($settings['heading_class'])) { if (!empty($settings['heading_class'])) {
$heading_class = implode(' ', [ $heading_class = implode(' ', [
$settings['heading_class'], $settings['heading_class'],
$item->getAttribute('class') $item->getAttribute('class'),
]); ]);
$item->setAttribute('class', $heading_class); $item->setAttribute('class', $heading_class);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment