protected function getMinIdx($parentId = 0, $moreThen = false)
    {
        $query = call_user_func("$this->ownerClassName::find")
            ->select("MIN($this->sortField)");
        if ( $moreThen !== false ) {
            $query->where([ '>', $this->sortField, $moreThen ]);
        }
        if ( $this->parentIdField ) {
            $query->andWhere([ $this->parentIdField => $parentId ]);
        }
        $result = $query->scalar();
        if ( $result === null ) {
            $result = $moreThen + 100;
        }
        return (int)$result;
    }