public function getChildren($headId, $relativeDepth = null, $summarize = false)
    {
        $head = $this->getNode($headId);
        $config = $this->config;
        $query = $this->table()
                ->select(null)
                ->select("$config[id] AS id")
                ->where("$config[lft] > ?", $head['lft'])
                ->where("$config[rgt] < ?", $head['rgt']);

        if (!is_null($relativeDepth)) {
            $absoluteDepth = $relativeDepth + $head['dpt'];
            if ($summarize) {
                $query->where("$config[dpt] <= ?", $absoluteDepth);
            } else {
                $query->where("$config[dpt] = ?", $absoluteDepth);
            }
        }

        $children = $query->fetchAll();

        return array_map(function($key) {
            return $key['id'];
        }, $children);
    }