Esempio n. 1
0
 /**
  * Deletes mutliple nodes and their children. To delete only one node and its children, use
  * self::tree_edit() with "edit_action" = "delete"
  */
 public static function tree_delete_nodes()
 {
     parent::$json_data += array('nb_deleted_nodes' => array());
     $tree = new ApmTreeData();
     $tree->load_last_tree();
     if (!empty($_POST['nodes_to_delete'])) {
         parent::$json_data['nb_deleted_nodes'] = $tree->delete_multiple_nodes($_POST['nodes_to_delete']);
     }
     parent::send_json();
 }