Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions entity_plus.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +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.
* - 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
4 changes: 2 additions & 2 deletions entity_plus.module
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,8 @@ function _entity_plus_defaults_rebuild($entity_type) {
);

// Check for the existence of the module and status columns.
if (!in_array($keys['status'], $info['schema_fields_sql']['base table']) || !in_array($keys['module'], $info['schema_fields_sql']['base table'])) {
trigger_error("Missing database columns for the exportable entity $entity_type as defined by entity_plus_exportable_schema_fields(). Update the according module and run update.php!", E_USER_WARNING);
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