Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
paragraphs_table
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
0
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
paragraphs_table
Merge requests
!9
Issue
#3421514
: Update the code for validating the condition.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Issue
#3421514
: Update the code for validating the condition.
issue/paragraphs_table-3421514:3421514-add-button-not
into
2.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Closed
Sakthi Shanmuga Sundaram M
requested to merge
issue/paragraphs_table-3421514:3421514-add-button-not
into
2.x
10 months ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#3421514
👍
0
👎
0
Merge request reports
Compare
2.x
2.x (base)
and
latest version
latest version
c392ee64
1 commit,
10 months ago
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Plugin/Field/FieldFormatter/ParagraphsTableFormatter.php
+
1
−
1
Options
@@ -714,7 +714,7 @@ class ParagraphsTableFormatter extends EntityReferenceFormatterBase {
$addButton
=
NULL
;
$userRoles
=
$this
->
currentUser
->
getRoles
();
$cardinality
=
$field_definition
->
getFieldStorageDefinition
()
->
get
(
'cardinality'
);
if
(
$entityId
&&
if
(
$entityId
&&
$setting
[
'form_format_table'
]
==
TRUE
&&
((
$hasPermission
&&
$this
->
customPermissions
[
'create'
])
||
in_array
(
'administrator'
,
$userRoles
))
&&
(
$cardinality
==
-
1
||
$cardinality
>
$items
->
count
()))
{
$destination
=
$this
->
currentPath
->
getPath
();
Loading