diff --git a/entity_plus.api.php b/entity_plus.api.php index 058dbf8..d55dd85 100644 --- a/entity_plus.api.php +++ b/entity_plus.api.php @@ -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() diff --git a/entity_plus.module b/entity_plus.module index 816f215..3612a5e 100644 --- a/entity_plus.module +++ b/entity_plus.module @@ -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; }