Skip to content

Commit

Permalink
Issue #2673688 by himanshu_sindhwani, kkalashnikov, atul4drupal, Saur…
Browse files Browse the repository at this point in the history
…abh_sgh, walangitan, andypost, markdorison, Bunty Badgujar, xjm, catch: Remove remains of hook_field_schema()

(cherry picked from commit 8d67348e9a32fc57dfbb5f42e3952fd5a3faff6c)
  • Loading branch information
alexpott committed Jun 15, 2020
1 parent 03fce69 commit 3e9296c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions lib/Drupal/Core/Field/FieldConfigBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
*
* The default value is expressed as a numerically indexed array of items,
* each item being an array of key/value pairs matching the set of 'columns'
* defined by the "field schema" for the field type, as exposed in
* hook_field_schema(). If the number of items exceeds the cardinality of the
* field, extraneous items will be ignored.
* defined by the "field schema" for the field type, as exposed in the class
* implementing \Drupal\Core\Field\FieldItemInterface::schema() method. If the
* number of items exceeds the cardinality of the field, extraneous items will
* be ignored.
*
* This property is overlooked if the $default_value_callback is non-empty.
*
Expand Down
4 changes: 2 additions & 2 deletions modules/field/field.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*
* In the Field API, each field has a type, which determines what kind of data
* (integer, string, date, etc.) the field can hold, which settings it provides,
* and so on. The data type(s) accepted by a field are defined in
* hook_field_schema().
* and so on. The data type(s) accepted by a field are defined in the class
* implementing \Drupal\Core\Field\FieldItemInterface::schema() method.
*
* Field types are plugins annotated with class
* \Drupal\Core\Field\Annotation\FieldType, and implement plugin interface
Expand Down
8 changes: 5 additions & 3 deletions modules/field/src/Entity/FieldStorageConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI
* The custom storage indexes for the field data storage.
*
* This set of indexes is merged with the "default" indexes specified by the
* field type in hook_field_schema() to determine the actual set of indexes
* that get created.
* field type in the class implementing
* \Drupal\Core\Field\FieldItemInterface::schema() method to determine the
* actual set of indexes that get created.
*
* The indexes are defined using the same definition format as Schema API
* index specifications. Only columns that are part of the field schema, as
* defined by the field type in hook_field_schema(), are allowed.
* defined by the field type in the class implementing
* \Drupal\Core\Field\FieldItemInterface::schema() method, are allowed.
*
* Some storage backends might not support indexes, and discard that
* information.
Expand Down

0 comments on commit 3e9296c

Please sign in to comment.