private function _isCategoryDuplicate($originalId)
    {
        $category = (new \Cms\Orm\CmsCategoryQuery)->findPk($originalId);
        //znaleziono kategorię o tym samym uri
        return (null !== (new \Cms\Orm\CmsCategoryQuery)
            ->whereId()->notEquals($category->id)
            ->andFieldRedirectUri()->equals(null)
            ->andFieldStatus()->equals(\Cms\Orm\CmsCategoryRecord::STATUS_ACTIVE)
            ->andQuery((new \Cms\Orm\CmsCategoryQuery)->searchByUri($category->uri))
            ->findFirst()) && !$category->redirectUri && !$category->customUri;
    }