Skip to content
Snippets Groups Projects
Commit fe8cace4 authored by Mark Fullmer's avatar Mark Fullmer Committed by Sven Decabooter
Browse files

Issue #3431586 by mark_fullmer, mmarler, znerol: Automated Drupal 11...

Issue #3431586 by mark_fullmer, mmarler, znerol: Automated Drupal 11 compatibility fixes for layout_builder_iframe_modal
parent 0b85463b
No related branches found
No related tags found
1 merge request!14Resolve #3431586 "D11"
Pipeline #369531 canceled
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# 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.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
# - '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
variables:
# Broaden test coverage.
OPT_IN_TEST_PREVIOUS_MAJOR: 1
# Skip false positives
SKIP_CSPELL: 1
name: Layout Builder iFrame Modal
type: module
description: 'Render Layout Builder edit forms in an iframe'
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^10.1.3 || ^11
lifecycle: stable
configure: layout_builder_iframe_modal.settings
......
......@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Drupal\layout_builder_iframe_modal\Render\MainContent;
use Drupal\Component\Utility\DeprecationHelper;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\layout_builder_iframe_modal\Ajax\OpenIframeCommand;
use Drupal\Core\Routing\RouteMatchInterface;
......@@ -60,7 +61,12 @@ class IframeRenderer extends DialogRenderer {
$title = isset($main_content['#title']) ? $main_content['#title'] : $this->titleResolver->getTitle($request, $route_match->getRouteObject());
if (is_array($title)) {
$title = $this->renderer->renderPlain($title);
$title = DeprecationHelper::backwardsCompatibleCall(
currentVersion: \Drupal::VERSION,
deprecatedVersion: '10.3',
currentCallable: fn() => $this->renderer->renderInIsolation($title),
deprecatedCallable: fn() => $this->renderer->renderPlain($title),
);
}
$options = $request->request->all('dialogOptions');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment