コード例 #1
0
ファイル: tree_data.php プロジェクト: erkmen/wpstartersetup
 /**
  * Loads given $node_to_load : retrieves tree data, wp_ids (if load_data=true), and
  * wp data (if load_data=true and $no_wp_data=false).
  * @param $nodes_to_load
  * @param $cascading_nodes : nodes we have to retrieve children for.
  * @param $load_data
  * @param $no_wp_data
  */
 public function load_specific_nodes($nodes_to_load, $cascading_nodes, $no_wp_data = false)
 {
     $tree = ApmTreeDb::get_last_tree();
     if (!empty($tree)) {
         $this->apm_tree = new ApmTree($tree);
         if (!empty($cascading_nodes)) {
             foreach ($cascading_nodes as $apm_id) {
                 if (in_array($apm_id, $nodes_to_load)) {
                     $nodes_to_load = array_merge($nodes_to_load, $this->apm_tree->get_children($apm_id));
                 }
             }
             $nodes_to_load = array_unique($nodes_to_load);
         }
         $this->nodes_data->load_multiple($nodes_to_load, $no_wp_data);
         $this->tree_state->load();
     }
     return $nodes_to_load;
 }
コード例 #2
0
ファイル: options.php プロジェクト: CrankMaster336/FFW-TR
 /**
  * Debug function : to display tree nodes fold/unfold states
  */
 public static function get_tree_state()
 {
     $tree_state = new ApmTreeState();
     $tree_state->load();
     return $tree_state->get_tree_state();
 }