private function order($position, $item)
    {
        $category = $this->categoryRepository->find($item['id']);
        $this->savePosition($category, $position);
        $this->makeItemChildOf($category, null);

        if ($this->hasChildren($item)) {
            $this->handleChildrenForParent($category, $item['children']);
        }
    }