|
| hook_entity_create (&$entity, $entity_type) |
|
| hook_bundle_create (&$bundle, $storage_args) |
|
| hook_bundle_postcreate (&$bundle) |
|
| hook_tripal_cron_notification () |
|
| hook_bundle_delete ($bundle) |
|
| hook_tripal_default_title_format ($bundle, $available_tokens) |
|
| tripal_load_entity ($entity_type, $ids=FALSE, $reset=FALSE, $field_ids=[], $cache=TRUE) |
|
| tripal_load_term_entity ($values) |
|
| tripal_load_vocab_entity ($values) |
|
| tripal_load_bundle_entity ($values) |
|
| tripal_add_notification ($title, $details, $type, $actions, $submitter_id) |
|
| tripal_create_bundle ($args, $job=NULL) |
|
| tripal_get_content_types () |
|
| tripal_tripal_cron_notification () |
|
| tripal_get_content_type ($bundle_name) |
|
| tripal_create_bundle_fields ($bundle, $term) |
|
| tripal_update_bundle_field ($field_name, $field_info, $entity_type_name, $bundle_name) |
|
| tripal_get_bundle_variable ($variable_name, $bundle_id, $default=FALSE) |
|
| tripal_set_bundle_variable ($variable_name, $bundle_id, $value) |
|
| tripal_get_title_format ($bundle) |
|
| tripal_save_title_format ($entity, $format) |
|
| tripal_get_default_title_format ($bundle) |
|
| tripal_get_entity_tokens ($bundle, $options=[]) |
|
| _tripal_get_entity_tokens_for_elements ($instance, $parent, $elements, &$tokens, $options) |
|
| tripal_replace_entity_tokens ($string, &$entity, $bundle_entity=NULL) |
|
| _tripal_replace_entity_tokens_for_elements ($elements, $values) |
|
| theme_token_list ($tokens) |
|
| tripal_entity_label ($entity) |
|
| tripal_get_bundle_details ($bundle_name) |
|
| _tripal_get_bundle_field_element_details ($elements, &$field_details) |
|
| tripal_insert_entity ($bundle_name, $values) |
|
| tripal_update_entity ($bundle_name, $values) |
|
| tripal_unpublish_orphans (int $bundle_id, TripalJob $job=NULL) |
|
| hook_bundle_delete_orphans (TripalBundle $bundle, array $ids, TripalJob $job=NULL) |
|
| hook_bundle_find_orphans (TripalBundle $bundle, $count=FALSE, $offset=0, $limit=10) |
|
Provides an application programming interface (API) for working with TripalEntity content types (bundles) and their entities.
A hook for modules to delete details for orphaned entities.
This hook is called by the TripalBundleController. Modules that create entities should use this hook to clean up entities that are orphaned. The list of $ids passed should be entities who are already known to be orphaned. These IDs are found by the TripalBundleController using the results from the hook_bundle_find_orphans() function.
An implementation of this hook should not try to clean up the entity itself, but rather it should only clean up its own records used to manage the relationship between the entity and the underlying data that the module provides.
An orphaned entity can occur if the module that created the entity unknowingly lost its underlying record in its data store. Such a case could happen if someone directly removed the record from the data store outside of the module's control. This function allows each module to report if any orphans are missing for a given bundle type.
- Parameters
-
TripalBundle | $bundle | A TripalBundle object for the bundle whose entities are orphaned. |
array | $ids | A list of entity IDs known to be orphaned. |
TripalJob | $job | An optional Tripal Job object. This is provided when this function is called using the Tripal Jobs system. Implementors of this hook can use the addItemsHandled() function to indicate how many entities were cleaned up. |
- Returns
- integer The number of entities that were cleaned up.