You are here

function hook_hosting_task_guarded_nodes in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 hosting.api.php \hook_hosting_task_guarded_nodes()

Return a list of Aegir entities to guard against destructive tasks.

@see: hook_hosting_task_dangerous_tasks(). @see: hook_hosting_task_guarded_nodes_alter();

Related topics

2 functions implement hook_hosting_task_guarded_nodes()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

hosting_platform_hosting_task_guarded_nodes in platform/hosting_platform.module
Implements hook_hosting_task_guarded_nodes().
hosting_site_hosting_task_guarded_nodes in site/hosting_site.module
Implements hook_hosting_task_guarded_nodes().
1 invocation of hook_hosting_task_guarded_nodes()
hosting_task_get_guarded_nodes in task/hosting_task.module
Invoke hooks to build a list of NIDs to guard.

File

./hosting.api.php, line 420
Hooks provided by the hosting module, and some other random ones.

Code

function hook_hosting_task_guarded_nodes() {

  // Guard against destructive tasks run on the hostmaster site or platform.
  $hostmaster_site_nid = hosting_get_hostmaster_site_nid();
  $hostmaster_platform_nid = hosting_get_hostmaster_platform_nid();
  $guarded_nids = array(
    $hostmaster_site_nid,
    $hostmaster_platform_nid,
  );
  return $guarded_nids;
}