diff -u b/core/modules/field/src/Plugin/views/field/Field.php b/core/modules/field/src/Plugin/views/field/Field.php --- b/core/modules/field/src/Plugin/views/field/Field.php +++ b/core/modules/field/src/Plugin/views/field/Field.php @@ -181,8 +181,8 @@ $this->limit_values = FALSE; $field_definition = $this->getFieldDefinition(); - $cardinality = $field_definition->getCardinality(); - if ($field_definition->isMultiple()) { + $cardinality = $field_definition->getFieldStorageDefinition()->getCardinality(); + if ($field_definition->getFieldStorageDefinition()->isMultiple()) { $this->multiple = TRUE; // If "Display all values in the same row" is FALSE, then we always limit diff -u b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php --- b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php @@ -82,7 +82,7 @@ } // Determine the number of widgets to display. - $cardinality = $this->fieldDefinition->getCardinality(); + $cardinality = $this->fieldDefinition->getFieldStorageDefinition()->getCardinality(); switch ($cardinality) { case FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED: $max = count($items); @@ -198,7 +198,7 @@ 'description_field' => NULL, ); - $cardinality = $this->fieldDefinition->getCardinality(); + $cardinality = $this->fieldDefinition->getFieldStorageDefinition()->getCardinality(); $defaults = array( 'fids' => array(), 'display' => (bool) $field_settings['display_default'], only in patch2: unchanged: --- a/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php +++ b/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php @@ -29,7 +29,7 @@ public function isCompatible(FieldItemListInterface $items) { $field_definition = $items->getFieldDefinition(); // This editor is incompatible with multivalued fields. - if ($field_definition->getCardinality() != 1) { + if ($field_definition->getFieldStorageDefinition()->getCardinality() != 1) { return FALSE; } // This editor is compatible with processed ("rich") text fields; but only only in patch2: unchanged: --- a/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php +++ b/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php @@ -109,12 +109,12 @@ public static function settingsForm(FieldDefinitionInterface $field_definition) }); foreach ($bundle_fields as $instance_name => $field_definition) { /* @var \Drupal\Core\Field\FieldDefinitionInterface $field_definition */ - $columns = $field_definition->getColumns(); + $columns = $field_definition->getFieldStorageDefinition()->getColumns(); // If there is more than one column, display them all, otherwise just // display the field label. // @todo: Use property labels instead of the column name. if (count($columns) > 1) { - foreach ($field_definition->getColumns() as $column_name => $column_info) { + foreach ($columns as $column_name => $column_info) { $fields[$instance_name . '.' . $column_name] = t('@label (@column)', array('@label' => $field_definition->getLabel(), '@column' => $column_name)); } } only in patch2: unchanged: --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -215,7 +215,7 @@ function template_preprocess_file_upload_help(&$variables) { * fid, FALSE if it does not. */ function file_field_find_file_reference_column(FieldDefinitionInterface $field) { - $schema = $field->getSchema(); + $schema = $field->getFieldStorageDefinition()->getSchema(); foreach ($schema['foreign keys'] as $data) { if ($data['table'] == 'file_managed') { foreach ($data['columns'] as $field_column => $column) { only in patch2: unchanged: --- a/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php +++ b/core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php @@ -85,7 +85,7 @@ public function settingsSummary() { protected function formMultipleElements(FieldItemListInterface $items, array &$form, array &$form_state) { $elements = parent::formMultipleElements($items, $form, $form_state); - $cardinality = $this->fieldDefinition->getCardinality(); + $cardinality = $this->fieldDefinition->getFieldStorageDefinition()->getCardinality(); $file_upload_help = array( '#theme' => 'file_upload_help', '#description' => '', only in patch2: unchanged: --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -103,7 +103,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen // If cardinality is 1, ensure a label is output for the field by wrapping it // in a details element. - if ($this->fieldDefinition->getCardinality() == 1) { + if ($this->fieldDefinition->getFieldStorageDefinition()->getCardinality() == 1) { $element += array( '#type' => 'fieldset', ); only in patch2: unchanged: --- a/core/modules/quickedit/src/Plugin/InPlaceEditor/PlainTextEditor.php +++ b/core/modules/quickedit/src/Plugin/InPlaceEditor/PlainTextEditor.php @@ -29,7 +29,7 @@ public function isCompatible(FieldItemListInterface $items) { $field_definition = $items->getFieldDefinition(); // This editor is incompatible with multivalued fields. - if ($field_definition->getCardinality() != 1) { + if ($field_definition->getFieldStorageDefinition()->getCardinality() != 1) { return FALSE; } // This editor is incompatible with processed ("rich") text fields. only in patch2: unchanged: --- a/core/modules/quickedit/tests/modules/src/Plugin/InPlaceEditor/WysiwygEditor.php +++ b/core/modules/quickedit/tests/modules/src/Plugin/InPlaceEditor/WysiwygEditor.php @@ -27,7 +27,7 @@ public function isCompatible(FieldItemListInterface $items) { $field_definition = $items->getFieldDefinition(); // This editor is incompatible with multivalued fields. - if ($field_definition->getCardinality() != 1) { + if ($field_definition->getFieldStorageDefinition()->getCardinality() != 1) { return FALSE; } // This editor is compatible with processed ("rich") text fields; but only