public function getListTreeEmployee($id = null, $includeRoot = true, $includeBlocked = false) {
		$cachePath = 'employees_tree_list_' . md5(serialize(func_get_args()));
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$conditions = $this->_getConditionsForEmployeeTreeInfo($id, $includeRoot, $includeBlocked);
		if ($conditions === false) {
			return $result;
		}

		$keyPath = '{n}.' . $this->Employee->alias . '.id';
		$valuePath = '{n}.' . $this->Employee->alias . '.' . $this->Employee->displayField;
		$spacer = '--';
		$recursive = 0;
		$result = $this->generateTreeList($conditions, $keyPath, $valuePath, $spacer, $recursive);

		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES);

		return $result;
	}
public function getListTreeEmployee($id = null, $includeRoot = true, $includeBlocked = false) {
		$cachePath = 'employees_tree_list_' . md5(serialize(func_get_args()));
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$conditions = $this->_getConditionsForEmployeeTreeInfo($id, $includeRoot, $includeBlocked);
		if ($conditions === false) {
			return $result;
		}

		$keyPath = '{n}.' . $this->Employee->alias . '.id';
		$valuePath = '{n}.' . $this->Employee->alias . '.' . $this->Employee->displayField;
		$spacer = '--';
		$recursive = 0;
		$result = $this->generateTreeList($conditions, $keyPath, $valuePath, $spacer, $recursive);

		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES);

		return $result;
	}
public function getListTreeEmployee ( $ id = null , $ includeRoot = true , $ includeBlocked = false ) { $ cachePath = 'employees_tree_list_' . md5 ( serialize ( func_get_args ( ) ) ) ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES ) ; if ( $ cached !== false ) { return $ cached ; } $ result = [ ] ; $ conditions = $ this -> _getConditionsForEmployeeTreeInfo ( $ id , $ includeRoot , $ includeBlocked ) ; if ( $ conditions === false ) { return $ result ; } $ keyPath = '{n}.' . $ this -> Employee -> alias . '.id' ; $ valuePath = '{n}.' . $ this -> Employee -> alias . '.' . $ this -> Employee -> displayField ; $ spacer = '--' ; $ recursive = 0 ; $ result = $ this -> generateTreeList ( $ conditions , $ keyPath , $ valuePath , $ spacer , $ recursive ) ; Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_TREE_EMPLOYEES ) ; return $ result ; }
Return tree of subordinate employees as list

@param int|string $id ID of record as root element
@param bool $includeRoot If True, include root element in result
@param bool $includeBlocked If False, include only non-blocked employees.
@return array Return list of subordinate employees.
Return tree of subordinate employees as list