You are here

function _deploy_managed_ui_entity_save in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_managed_ui/deploy_managed_ui.module \_deploy_managed_ui_entity_save()

Handled deployment plans attached to entities being saved.

Parameters

object: $entity The entity being saved.

string: $entity_type The type of entity being saved.

2 calls to _deploy_managed_ui_entity_save()
deploy_managed_ui_entity_insert in modules/deploy_managed_ui/deploy_managed_ui.module
Implements hook_entity_insert().
deploy_managed_ui_entity_update in modules/deploy_managed_ui/deploy_managed_ui.module
Implements hook_entity_update().

File

modules/deploy_managed_ui/deploy_managed_ui.module, line 140
Deploy Managed UI module functions.

Code

function _deploy_managed_ui_entity_save($entity, $type) {

  // Ignore all entities which don't have plans attached.
  if (empty($entity->___deploy_plans)) {
    return;
  }
  foreach ($entity->___deploy_plans as $plan) {
    deploy_manager_add_to_plan($plan, $type, $entity);
  }
}