function NoFieldItemsExistWithHigherCardinalityTest::messageParametersProvider

Data provider for testMessageParameters.

File

core/modules/field/tests/src/Unit/Plugin/Validation/Constraint/NoFieldItemsExistWithHigherCardinalityTest.php, line 66

Class

NoFieldItemsExistWithHigherCardinalityTest
Tests the NoFieldItemsExistWithHigherCardinality constraint.

Namespace

Drupal\Tests\field\Unit\Plugin\Validation\Constraint

Code

public static function messageParametersProvider() : array {
  return [
    [
      'node',
      'field_body',
      3,
      2,
      "The field 'field_body' of entity type 'node' has more entries (3) than the cardinality (2) allows.",
    ],
    [
      'user',
      'field_address',
      5,
      1,
      "The field 'field_address' of entity type 'user' has more entries (5) than the cardinality (1) allows.",
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.