diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php index 2130053..3cff21d 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -603,7 +603,7 @@ protected function doLoadFieldItems($entities, $age) { $delta_count[$row->entity_id][$row->langcode] = 0; } - if ($field['cardinality'] == FieldInterface::FIELD_CARDINALITY_UNLIMITED || $delta_count[$row->entity_id][$row->langcode] < $field['cardinality']) { + if ($field['cardinality'] == FieldInterface::CARDINALITY_UNLIMITED || $delta_count[$row->entity_id][$row->langcode] < $field['cardinality']) { $item = array(); // For each column declared by the field, populate the item from the // prefixed database column. @@ -685,7 +685,7 @@ protected function doSaveFieldItems(EntityInterface $entity, $update) { $query->values($record); $revision_query->values($record); - if ($field['cardinality'] != FieldInterface::FIELD_CARDINALITY_UNLIMITED && ++$delta_count == $field['cardinality']) { + if ($field['cardinality'] != FieldInterface::CARDINALITY_UNLIMITED && ++$delta_count == $field['cardinality']) { break; } } diff --git a/core/lib/Drupal/Core/Entity/Field/FieldDefinition.php b/core/lib/Drupal/Core/Entity/Field/FieldDefinition.php index 78a75fe..3effe65 100644 --- a/core/lib/Drupal/Core/Entity/Field/FieldDefinition.php +++ b/core/lib/Drupal/Core/Entity/Field/FieldDefinition.php @@ -192,7 +192,7 @@ public function isFieldRequired() { */ public function isFieldMultiple() { $cardinality = $this->getFieldCardinality(); - return ($cardinality == static::FIELD_CARDINALITY_UNLIMITED) || ($cardinality > 1); + return ($cardinality == static::CARDINALITY_UNLIMITED) || ($cardinality > 1); } /** diff --git a/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php index 9e9e630..dc18e87 100644 --- a/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php +++ b/core/lib/Drupal/Core/Entity/Field/FieldDefinitionInterface.php @@ -54,10 +54,9 @@ interface FieldDefinitionInterface { /** - * Value for field API indicating a field accepts an unlimited number of - * values. + * Value indicating a field accepts an unlimited number of values. */ - const FIELD_CARDINALITY_UNLIMITED = -1; + const CARDINALITY_UNLIMITED = -1; /** * Returns the machine name of the field. @@ -158,7 +157,7 @@ public function getFieldDescription(); * Returns the maximum number of items allowed for the field. * * Possible values are positive integers or - * FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED. + * FieldDefinitionInterface::CARDINALITY_UNLIMITED. * * @return integer * The field cardinality. diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php index 28b84c5..dc93ecc 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutoCreateTest.php @@ -45,7 +45,7 @@ function setUp() { 'target_type' => 'node', ), 'type' => 'entity_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ))->save(); entity_create('field_instance', array( diff --git a/core/modules/field/field.form.inc b/core/modules/field/field.form.inc index cbca8eb..f7bcd6b 100644 --- a/core/modules/field/field.form.inc +++ b/core/modules/field/field.form.inc @@ -25,7 +25,7 @@ function theme_field_multiple_value_form($variables) { $element = $variables['element']; $output = ''; - if ($element['#cardinality'] > 1 || $element['#cardinality'] == FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED) { + if ($element['#cardinality'] > 1 || $element['#cardinality'] == FieldDefinitionInterface::CARDINALITY_UNLIMITED) { $form_required_marker = array('#theme' => 'form_required_marker'); $required = !empty($element['#required']) ? drupal_render($form_required_marker) : ''; $table_id = drupal_html_id($element['#field_name'] . '_values'); @@ -174,7 +174,7 @@ function field_add_more_js($form, $form_state) { $element = NestedArray::getValue($form, array_slice($button['#array_parents'], 0, -1)); // Ensure the widget allows adding additional items. - if ($element['#cardinality'] != FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED) { + if ($element['#cardinality'] != FieldDefinitionInterface::CARDINALITY_UNLIMITED) { return; } diff --git a/core/modules/field/lib/Drupal/field/Entity/Field.php b/core/modules/field/lib/Drupal/field/Entity/Field.php index 2c0eca9..b86cf89 100644 --- a/core/modules/field/lib/Drupal/field/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Entity/Field.php @@ -122,7 +122,7 @@ class Field extends ConfigEntityBase implements FieldInterface { * The field cardinality. * * The maximum number of values the field can hold. Possible values are - * positive integers or FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED. + * positive integers or FieldDefinitionInterface::CARDINALITY_UNLIMITED. * Defaults to 1. * * @var integer @@ -602,7 +602,7 @@ public function isFieldRequired() { */ public function isFieldMultiple() { $cardinality = $this->getFieldCardinality(); - return ($cardinality == static::FIELD_CARDINALITY_UNLIMITED) || ($cardinality > 1); + return ($cardinality == static::CARDINALITY_UNLIMITED) || ($cardinality > 1); } /** diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php index 0ffa101..f78dc56 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/FieldType/ConfigFieldItemList.php @@ -55,7 +55,7 @@ public function getConstraints() { // form submitted values, this can only happen with 'multiple value' // widgets. $cardinality = $this->getFieldDefinition()->getFieldCardinality(); - if ($cardinality != FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED) { + if ($cardinality != FieldDefinitionInterface::CARDINALITY_UNLIMITED) { $constraints[] = \Drupal::typedData() ->getValidationConstraintManager() ->create('Count', array( diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php index 2577147..cfc872c 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php @@ -151,7 +151,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f // Determine the number of widgets to display. switch ($cardinality) { - case FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED: + case FieldDefinitionInterface::CARDINALITY_UNLIMITED: $field_state = field_form_get_state($parents, $field_name, $form_state); $max = $field_state['items_count']; $is_multiple = TRUE; @@ -214,7 +214,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f ); // Add 'add more' button, if not working with a programmed form. - if ($cardinality == FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED && empty($form_state['programmed'])) { + if ($cardinality == FieldDefinitionInterface::CARDINALITY_UNLIMITED && empty($form_state['programmed'])) { $elements['add_more'] = array( '#type' => 'submit', '#name' => strtr($id_prefix, '-', '_') . '_add_more', diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php index ebc9360..b9b2fe3 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php @@ -487,7 +487,7 @@ function multiple_options_form(&$form, &$form_state) { // translating prefix and suffix separately. list($prefix, $suffix) = explode('@count', t('Display @count value(s)')); - if ($field['cardinality'] == FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED) { + if ($field['cardinality'] == FieldDefinitionInterface::CARDINALITY_UNLIMITED) { $type = 'textfield'; $options = NULL; $size = 5; diff --git a/core/modules/field/lib/Drupal/field/Tests/FormTest.php b/core/modules/field/lib/Drupal/field/Tests/FormTest.php index e30e968..d322dbc 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FormTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FormTest.php @@ -75,7 +75,7 @@ function setUp() { 'name' => 'field_unlimited', 'entity_type' => 'entity_test', 'type' => 'test_field', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ); $this->instance = array( diff --git a/core/modules/field/lib/Drupal/field/Tests/NestedFormTest.php b/core/modules/field/lib/Drupal/field/Tests/NestedFormTest.php index f56d8f5..dd8e164 100644 --- a/core/modules/field/lib/Drupal/field/Tests/NestedFormTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/NestedFormTest.php @@ -41,7 +41,7 @@ public function setUp() { 'name' => 'field_unlimited', 'entity_type' => 'entity_test', 'type' => 'test_field', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ); $this->instance = array( diff --git a/core/modules/field/lib/Drupal/field/Tests/Views/HandlerFieldFieldTest.php b/core/modules/field/lib/Drupal/field/Tests/Views/HandlerFieldFieldTest.php index dd792b6..21a8fa4 100644 --- a/core/modules/field/lib/Drupal/field/Tests/Views/HandlerFieldFieldTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/Views/HandlerFieldFieldTest.php @@ -52,7 +52,7 @@ protected function setUp() { 'name' => 'field_name_3', 'entity_type' => 'node', 'type' => 'text', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, )); $field->save(); // Setup a field that will have no value. @@ -60,7 +60,7 @@ protected function setUp() { 'name' => 'field_name_4', 'entity_type' => 'node', 'type' => 'text', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, )); $field->save(); diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php index 77bd8e6..8896524 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php @@ -126,13 +126,13 @@ public function buildForm(array $form, array &$form_state, FieldInstanceInterfac '#title_display' => 'invisible', '#options' => array( 'number' => $this->t('Limited'), - FieldInstanceInterface::FIELD_CARDINALITY_UNLIMITED => $this->t('Unlimited'), + FieldInstanceInterface::CARDINALITY_UNLIMITED => $this->t('Unlimited'), ), - '#default_value' => ($cardinality == FieldInstanceInterface::FIELD_CARDINALITY_UNLIMITED) ? FieldInstanceInterface::FIELD_CARDINALITY_UNLIMITED : 'number', + '#default_value' => ($cardinality == FieldInstanceInterface::CARDINALITY_UNLIMITED) ? FieldInstanceInterface::CARDINALITY_UNLIMITED : 'number', ); $form['field']['cardinality_container']['cardinality_number'] = array( '#type' => 'number', - '#default_value' => $cardinality != FieldInstanceInterface::FIELD_CARDINALITY_UNLIMITED ? $cardinality : 1, + '#default_value' => $cardinality != FieldInstanceInterface::CARDINALITY_UNLIMITED ? $cardinality : 1, '#min' => 1, '#title' => $this->t('Limit'), '#title_display' => 'invisible', diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php index 2f44f5a..8e34f00 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php @@ -200,12 +200,12 @@ function cardinalitySettings() { // Set to unlimited. $edit = array( - 'field[cardinality]' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'field[cardinality]' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ); $this->drupalPostForm($field_edit_path, $edit, t('Save field settings')); $this->assertText('Updated field Body field settings.'); $this->drupalGet($field_edit_path); - $this->assertFieldByXPath("//select[@name='field[cardinality]']", FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED); + $this->assertFieldByXPath("//select[@name='field[cardinality]']", FieldDefinitionInterface::CARDINALITY_UNLIMITED); $this->assertFieldByXPath("//input[@name='field[cardinality_number]']", 1); } diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php index 67391a8..1ce2f45 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php +++ b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php @@ -77,7 +77,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f // Determine the number of widgets to display. $cardinality = $this->fieldDefinition->getFieldCardinality(); switch ($cardinality) { - case FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED: + case FieldDefinitionInterface::CARDINALITY_UNLIMITED: $max = count($items); $is_multiple = TRUE; break; @@ -124,7 +124,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f } $empty_single_allowed = ($cardinality == 1 && $delta == 0); - $empty_multiple_allowed = ($cardinality == FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED || $delta < $cardinality) && empty($form_state['programmed']); + $empty_multiple_allowed = ($cardinality == FieldDefinitionInterface::CARDINALITY_UNLIMITED || $delta < $cardinality) && empty($form_state['programmed']); // Add one more empty row for new uploads except when this is a programmed // multiple form as it is not necessary. diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php index 37b0beb..55a1208 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldValidateTest.php @@ -53,7 +53,7 @@ function testRequired() { // Try again with a multiple value field. $field->delete(); - $this->createFileField($field_name, 'node', $type_name, array('cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED), array('required' => '1')); + $this->createFileField($field_name, 'node', $type_name, array('cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED), array('required' => '1')); // Try to post a new node without uploading a file in the multivalue field. $edit = array('title' => $this->randomName()); diff --git a/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php b/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php index cbd2e56..ed494f7 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileItemTest.php @@ -49,7 +49,7 @@ public function setUp() { 'name' => 'file_test', 'entity_type' => 'entity_test', 'type' => 'file', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ))->save(); entity_create('field_instance', array( 'entity_type' => 'entity_test', diff --git a/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php b/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php index 4544c50..0a26e6a 100644 --- a/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php +++ b/core/modules/image/lib/Drupal/image/Tests/ImageItemTest.php @@ -53,7 +53,7 @@ public function setUp() { 'name' => 'image_test', 'entity_type' => 'entity_test', 'type' => 'image', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ))->save(); entity_create('field_instance', array( 'entity_type' => 'entity_test', diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php index b94b86f..df377f2 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php @@ -63,7 +63,7 @@ public function setUp() { 'name' => $this->fieldName, 'entity_type' => 'entity_test_render', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/TaxonomyTermFieldAttributesTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/TaxonomyTermFieldAttributesTest.php index f1354a5..078681d 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/TaxonomyTermFieldAttributesTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/TaxonomyTermFieldAttributesTest.php @@ -159,7 +159,7 @@ protected function createTaxonomyTermReferenceField($field_name, $vocabulary) { 'name' => $field_name, 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php index 3d1c16b..884a191 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/MultiFormTest.php @@ -40,7 +40,7 @@ function setUp() { 'name' => $field_name, 'entity_type' => 'node', 'type' => 'text', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ))->save(); entity_create('field_instance', array( 'field_name' => $field_name, diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php index 082c6f7..9b1d860 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/RebuildTest.php @@ -76,7 +76,7 @@ function testPreserveFormActionAfterAJAX() { 'name' => $field_name, 'entity_type' => 'node', 'type' => 'text', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, ); entity_create('field_entity', $field)->save(); $instance = array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php index 6221e08..5706120 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php @@ -41,7 +41,7 @@ function setUp() { 'name' => $this->field_name, 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php index da9050a..76d9eba 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermReferenceItemTest.php @@ -49,7 +49,7 @@ public function setUp() { 'name' => 'field_test_taxonomy', 'entity_type' => 'entity_test', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermFieldMultipleVocabularyTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermFieldMultipleVocabularyTest.php index 388821b..9d8a17e 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermFieldMultipleVocabularyTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermFieldMultipleVocabularyTest.php @@ -46,7 +46,7 @@ function setUp() { 'name' => $this->field_name, 'entity_type' => 'entity_test', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php index 136b678..785b922 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermIndexTest.php @@ -37,7 +37,7 @@ function setUp() { 'name' => $this->field_name_1, 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( @@ -68,7 +68,7 @@ function setUp() { 'name' => $this->field_name_2, 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index fed35b7..3855557 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -32,7 +32,7 @@ function setUp() { 'name' => 'taxonomy_' . $this->vocabulary->id(), 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php index 3e1a7a3..ce0bf7c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php @@ -33,7 +33,7 @@ function setUp() { 'name' => $this->field_name, 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyTestBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyTestBase.php index e2f4d4b..616582d 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyTestBase.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/Views/TaxonomyTestBase.php @@ -83,7 +83,7 @@ protected function mockStandardInstall() { 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', // Set cardinality to unlimited for tagging. - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array( diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php index a655a9b..b483714 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php @@ -252,7 +252,7 @@ function testRegistrationWithUserFields() { $this->assertEqual($new_user->test_user_field->value, $value, 'The field value was correclty saved.'); // Check that the 'add more' button works. - $field->cardinality = FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED; + $field->cardinality = FieldDefinitionInterface::CARDINALITY_UNLIMITED; $field->save(); foreach (array('js', 'nojs') as $js) { $this->drupalGet('user/register'); diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php index e5ed13e..96a4280 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php @@ -59,7 +59,7 @@ function setUp() { 'name' => 'field_views_testing_tags', 'entity_type' => 'node', 'type' => 'taxonomy_term_reference', - 'cardinality' => FieldDefinitionInterface::FIELD_CARDINALITY_UNLIMITED, + 'cardinality' => FieldDefinitionInterface::CARDINALITY_UNLIMITED, 'settings' => array( 'allowed_values' => array( array(