Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
(Followup for #1763974: Convert entity type info into plugins)
The data_table
key of the entity info array (previously data table
) is not documented. It is used in the following places in core:
[lorentz:drupal | Tue 10:31:58] $ grep -r "data_table" * | grep -v ".patch"
core/modules/field/modules/field_sql_storage/field_sql_storage.install: $data_table = _field_sql_storage_tablename($field);
core/modules/field/modules/field_sql_storage/field_sql_storage.install: $table_info = array($data_table => $primary_key_data, $revision_table => $primary_key_revision);
core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php: if (isset($entity_info['data_table'])) {
core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php: $entity_tables[$entity_info['data_table']] = drupal_get_schema($entity_info['data_table']);
core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTest.php: * data_table = "entity_test_property_data",
Proposed resolution
Add documentation for the key in the docblock for the EntityManager
.
Comments
Comment #1
xjmComment #2
webflo CreditAttribution: webflo commentedThe data table key is already documented.