protected function getNodesBetween($min, $max)
    {
        $config = $this->config;
        $query = $this->tree->table()
                ->select(NULL)// fetch only id
                ->select("$config[id] AS id")
                ->where("($config[lft] >= :min AND $config[lft] <= :max) OR ($config[rgt] >= :min AND $config[rgt] <= :max)", [
                    ':min' => $min,
                    ':max' => $max,
                ])
                ->fetchAll();
        $ids = array_map(function ($key) {
            return $key['id'];
        }, $query);
        return $ids;
    }