Skip to content

Commit

Permalink
Changed key to cmi storage
Browse files Browse the repository at this point in the history
  • Loading branch information
argiepiano committed Jun 10, 2024
1 parent a8f9798 commit fc4d578
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions entity_plus.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@
* may use this value to decide whether they should deal with a certain entity
* type. Defaults to TRUE to for entity types that are exportable, else to
* FALSE.
* - disk storage: (optional) A boolean flag for configuration or exportable
* entities to indicate that this entity is stored on disk, instead of the
* database. It defaults to FALSE. NB: modules wishing to store entities on
* disk should override EntityPlusControllerExportable to handle all disk
* CRUD operations.
* - cmi storage: (optional) A boolean flag for configuration or exportable
* entities to indicate that this entity is stored as a Backdrop json CMI
* configuration, instead of on its own table in the database. It defaults
* to FALSE. NB: modules wishing to store entities as CMI should override
* EntityPlusControllerExportable to handle all CMI CRUD operations.
*
* @see entity_load()
* @see hook_entity_info_alter()
Expand Down
2 changes: 1 addition & 1 deletion entity_plus.module
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ function _entity_plus_defaults_rebuild($entity_type) {
);

// Check for the existence of the module and status columns.
if (empty($info['disk storage']) && (!in_array($keys['status'], $info['schema_fields_sql']['base table']) || !in_array($keys['module'], $info['schema_fields_sql']['base table']))) {
if (empty($info['cmi storage']) && (!in_array($keys['status'], $info['schema_fields_sql']['base table']) || !in_array($keys['module'], $info['schema_fields_sql']['base table']))) {
trigger_error("Missing database status and module columns for the exportable entity $entity_type.", E_USER_WARNING);
return;
}
Expand Down

0 comments on commit fc4d578

Please sign in to comment.