From 274c4cd5feede07bf734c0328579d207a2dc6a32 Mon Sep 17 00:00:00 2001
From: Tim Holt <hisboyelroymusic@gmail.com>
Date: Mon, 27 Oct 2014 08:06:30 -0500
Subject: [PATCH] adding hook to allow other module to block an entity from
 entering the auto deploy plan

---
 modules/deploy_auto_plan/deploy_auto_plan.module | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/deploy_auto_plan/deploy_auto_plan.module b/modules/deploy_auto_plan/deploy_auto_plan.module
index 2a24cec..ef7ab68 100644
--- a/modules/deploy_auto_plan/deploy_auto_plan.module
+++ b/modules/deploy_auto_plan/deploy_auto_plan.module
@@ -135,6 +135,14 @@ function _deploy_auto_plan_entity_save($entity, $type) {
     return;
   }
 
+  // Allow other modules to alter whether or not the entity should be added.
+  $status = TRUE;
+  drupal_alter('deploy_auto_plan_status', $status, $type, $entity);
+  if (!$status) {
+    // If status is FALSE then don't add the entity to the plan.
+    return;
+  }
+
   deploy_manager_add_to_plan($plan_name, $type, $entity);
 }
 
-- 
2.0.1

