Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
layout_paragraphs
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
layout_paragraphs
Merge requests
!125
Issue
#3352714
: Make Ajax response alterable from Layout Paragraphs operations
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#3352714
: Make Ajax response alterable from Layout Paragraphs operations
issue/layout_paragraphs-3352714:3352714-make-ajax-response
into
2.0.x
Overview
0
Commits
1
Pipelines
1
Changes
12
Open
igor mashevskyi
requested to merge
issue/layout_paragraphs-3352714:3352714-make-ajax-response
into
2.0.x
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
12
Expand
0
0
Merge request reports
Compare
2.0.x
version 1
63d92adf
2 years ago
2.0.x (HEAD)
and
latest version
latest version
f52bb567
1 commit,
6 months ago
version 1
63d92adf
1 commit,
2 years ago
12 files
+
247
−
33
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
Search (e.g. *.vue) (Ctrl+P)
src/Controller/ChooseComponentController.php
+
4
−
0
Options
@@ -8,6 +8,8 @@ use Drupal\Core\Template\Attribute;
use
Drupal\Core\Ajax\AjaxHelperTrait
;
use
Drupal\Core\Ajax\OpenDialogCommand
;
use
Drupal\Core\Controller\ControllerBase
;
use
Drupal\layout_paragraphs
\Event\LayoutParagraphsAjaxResponseEvent
;
use
Drupal\layout_paragraphs
\Event\LayoutParagraphsAjaxResponseEvents
;
use
Drupal\layout_paragraphs
\Utility\Dialog
;
use
Symfony\Component\HttpFoundation\Request
;
use
Drupal\layout_paragraphs
\LayoutParagraphsLayout
;
@@ -139,6 +141,8 @@ class ChooseComponentController extends ControllerBase {
$response
=
new
AjaxResponse
();
$selector
=
Dialog
::
dialogSelector
(
$layout_paragraphs_layout
);
$response
->
addCommand
(
new
OpenDialogCommand
(
$selector
,
$form
[
'#title'
],
$form
,
Dialog
::
dialogSettings
()));
$this
->
eventDispatcher
->
dispatch
(
new
LayoutParagraphsAjaxResponseEvent
(
$response
),
LayoutParagraphsAjaxResponseEvents
::
COMPONENT_FORM_CHOOSE
);
$this
->
eventDispatcher
->
dispatch
(
new
LayoutParagraphsAjaxResponseEvent
(
$response
),
LayoutParagraphsAjaxResponseEvents
::
LAYOUT_PARAGRAPH
);
return
$response
;
}
return
$form
;
Loading