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;
    }
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;
    }
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 ; }
Sprawdzanie czy kategoria ma duplikat
@param integer $originalId
@return boolean
Sprawdzanie czy kategoria ma duplikat