Skip to content
Snippets Groups Projects

Issue#3421514: Update the code for validating the condition.

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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