PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
wp-google-maps-pro
/
includes
<?php namespace WPGMZA; class CategoryTreeNode extends Factory implements \JsonSerializable { public $id; public $category_name = ""; public $priority = 0; public $marker_count = 0; public $children; public $parent; public $_category_icon; public function __construct($parent=null) { $this->children = array(); $this->_category_icon = new MarkerIcon(); } public function __get($name) { switch($name) { case "category_icon": return $this->_category_icon; break; } } public function __set($name, $value) { switch($name) { case "category_icon": $this->_category_icon = new MarkerIcon($value); break; } } public function jsonSerialize() { return array( 'id' => (int)$this->id, 'name' => $this->category_name, 'icon' => $this->category_icon, 'priority' => (int)$this->priority, 'children' => $this->children, 'marker_count' => (int)$this->marker_count ); } public function getChildByID($id) { if($this->id == $id) return $this; foreach($this->children as $child) { if($result = $child->getChildByID($id)) return $result; } return null; } public function getDepth() { $result = 0; for($node = $this->parent; $node != null; $node = $node->parent) $result++; return $result; } public function getAncestors() { $result = array(); for($node = $this->parent; $node != null; $node = $node->parent) $result[] = $node; return $result; } public function getDescendants() { $result = array(); foreach($this->children as $child) { $result[] = $child; $result = array_merge($result, $child->getDescendants()); } return $result; } public function getLeafNodes() { $result = array(); $descendants = $this->getDescendants(); foreach($descendants as $node) if(empty($node->children)) $result[] = $node; return $result; } public function toJsTreeStructure() { $obj = array( 'id' => $this->id ); if(!empty($this->category_name)) $obj['text'] = $this->category_name; else if(!empty($this->name)) $obj['text'] = $this->name; if(!empty($this->children)) { $obj['children'] = array(); foreach($this->children as $child) $obj['children'][] = $child->toJsTreeStructure(); } return $obj; } }
[-] class.category-tree-native.php
[edit]
[+]
3rd-party-integration
[-] class.marker-library-dialog.php
[edit]
[-] class.marker-icon.php
[edit]
[-] class.pro-marker-filter.php
[edit]
[-] class.marker-gallery.php
[edit]
[-] class.marker-listing.php
[edit]
[+]
import-export
[-] class.category-tree-node.php
[edit]
[-] class.pro-store-locator.php
[edit]
[-] class.map-select.php
[edit]
[-] class.fontawesome-icon-picker.php
[edit]
[+]
open-layers
[-] class.pro-page.php
[edit]
[-] class.pro-plugin.php
[edit]
[+]
compatibility
[-] class.marker-icon-picker.php
[edit]
[+]
google-maps
[-] class.pro-database.php
[edit]
[-] class.add-map-dialog.php
[edit]
[-] class.pro-marker.php
[edit]
[-] page.edit-polyline.php
[edit]
[+]
custom-fields
[-] class.pro-map.php
[edit]
[-] class.legacy-marker-listing.php
[edit]
[-] class.category.php
[edit]
[+]
tables
[-] class.categories.php
[edit]
[-] class.directions-box.php
[edit]
[-] class.category-picker.php
[edit]
[-] page.categories.php
[edit]
[+]
custom-field-filter-widgets
[-] class.pro-settings-migrator.php
[edit]
[+]
category-filter-widgets
[+]
import
[-] .DS_Store
[edit]
[+]
marker-listings
[-] class.marker-filtering-tab.php
[edit]
[+]
..
[-] class.category-tree-wordpress.php
[edit]
[-] class.marker-gallery-item.php
[edit]
[+]
map-edit-page
[-] class.heatmap.php
[edit]
[-] class.batched-operation.php
[edit]
[-] class.category-table.php
[edit]
[-] class.pro-settings-page.php
[edit]
[-] class.pro-feature.php
[edit]
[-] class.category-tree.php
[edit]
[-] class.pro-admin-ui.php
[edit]
[-] page.wizard.php
[edit]
[-] page.edit-polygon.php
[edit]
[-] class.content-editor-map-button.php
[edit]
[+]
legacy