Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
eca
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
eca
Merge requests
!498
Issue
#3519888
by jurgenhaas: ECA Misc: Add condition to see if the current request is ajax
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3519888
by jurgenhaas: ECA Misc: Add condition to see if the current request is ajax
issue/eca-3519888:3519888-eca-misc-add
into
3.0.x
Overview
0
Commits
1
Pipelines
5
Changes
1
Merged
Jürgen Haas
requested to merge
issue/eca-3519888:3519888-eca-misc-add
into
3.0.x
1 month ago
Overview
0
Commits
1
Pipelines
5
Changes
1
Expand
Closes
#3519888
0
0
Merge request reports
Compare
3.0.x
version 3
91f15721
3 weeks ago
version 2
91f15721
3 weeks ago
version 1
2903af88
1 month ago
3.0.x (base)
and
latest version
latest version
a746643b
1 commit,
4 days ago
version 3
91f15721
2 commits,
3 weeks ago
version 2
91f15721
23 commits,
3 weeks ago
version 1
2903af88
1 commit,
1 month ago
1 file
+
30
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
modules/miscellaneous/src/Plugin/ECA/Condition/IsAjax.php
0 → 100644
+
30
−
0
Options
<?php
namespace
Drupal\eca_misc\Plugin\ECA\Condition
;
use
Drupal\Core\Ajax\AjaxHelperTrait
;
use
Drupal\eca\Plugin\ECA\Condition\ConditionBase
;
/**
* Condition plugin to determine if the current request is an AJAX request.
*
* @EcaCondition(
* id = "eca_is_ajax",
* label = "Is Ajax",
* description = @Translation("Determines if the current request is an AJAX request."),
* eca_version_introduced = "2.1.8"
* )
*/
class
IsAjax
extends
ConditionBase
{
use
AjaxHelperTrait
;
/**
* {@inheritdoc}
*/
public
function
evaluate
():
bool
{
$result
=
$this
->
isAjax
();
return
$this
->
negationCheck
(
$result
);
}
}
Loading