protected function validateUrlData($urlData, $i)
    {
        $part1 = isset($urlData[$i]) ? explode('~', $urlData[$i]) : [];
        $part2 = isset($urlData[$i + 1]) ? explode('~', $urlData[$i + 1]) : [];
        $part3 = isset($urlData[$i + 2]) ? explode('~', $urlData[$i + 2]) : [];
        if (count($part1) == 1) {
            $module = $part1[0];
            if (count($part2) == 1) {
                $controller = $part2[0];
                if (count($part3) == 1) {
                    $action = $part3[0];
                } else {
                    $action = '';
                }
            } else {
                $controller = '';
                $action = '';
            }
        } else {
            $controller = '';
            $action = '';
            $module = '';
        }

        $config = Application::getConfigManager()->loadForModule('Cmf\System', 'module');

        $isDefaultModule = $module == $config->defaultModule;
        $isDefaultAction = $action == $config->defaultAction;
        $isDefaultController = ($action == '' && $controller == $config->defaultController);

        if ($isDefaultModule || $isDefaultAction || $isDefaultController) {
            $result = false;
        } else {
            $result = true;
        }

        return $result;
    }
protected function validateUrlData($urlData, $i)
    {
        $part1 = isset($urlData[$i]) ? explode('~', $urlData[$i]) : [];
        $part2 = isset($urlData[$i + 1]) ? explode('~', $urlData[$i + 1]) : [];
        $part3 = isset($urlData[$i + 2]) ? explode('~', $urlData[$i + 2]) : [];
        if (count($part1) == 1) {
            $module = $part1[0];
            if (count($part2) == 1) {
                $controller = $part2[0];
                if (count($part3) == 1) {
                    $action = $part3[0];
                } else {
                    $action = '';
                }
            } else {
                $controller = '';
                $action = '';
            }
        } else {
            $controller = '';
            $action = '';
            $module = '';
        }

        $config = Application::getConfigManager()->loadForModule('Cmf\System', 'module');

        $isDefaultModule = $module == $config->defaultModule;
        $isDefaultAction = $action == $config->defaultAction;
        $isDefaultController = ($action == '' && $controller == $config->defaultController);

        if ($isDefaultModule || $isDefaultAction || $isDefaultController) {
            $result = false;
        } else {
            $result = true;
        }

        return $result;
    }
protected function validateUrlData ( $ urlData , $ i ) { $ part1 = isset ( $ urlData [ $ i ] ) ? explode ( '~' , $ urlData [ $ i ] ) : [ ] ; $ part2 = isset ( $ urlData [ $ i + 1 ] ) ? explode ( '~' , $ urlData [ $ i + 1 ] ) : [ ] ; $ part3 = isset ( $ urlData [ $ i + 2 ] ) ? explode ( '~' , $ urlData [ $ i + 2 ] ) : [ ] ; if ( count ( $ part1 ) == 1 ) { $ module = $ part1 [ 0 ] ; if ( count ( $ part2 ) == 1 ) { $ controller = $ part2 [ 0 ] ; if ( count ( $ part3 ) == 1 ) { $ action = $ part3 [ 0 ] ; } else { $ action = '' ; } } else { $ controller = '' ; $ action = '' ; } } else { $ controller = '' ; $ action = '' ; $ module = '' ; } $ config = Application :: getConfigManager ( ) -> loadForModule ( 'Cmf\System' , 'module' ) ; $ isDefaultModule = $ module == $ config -> defaultModule ; $ isDefaultAction = $ action == $ config -> defaultAction ; $ isDefaultController = ( $ action == '' && $ controller == $ config -> defaultController ) ; if ( $ isDefaultModule || $ isDefaultAction || $ isDefaultController ) { $ result = false ; } else { $ result = true ; } return $ result ; }
This function check for duplicate of page
It's need for SEO

@param array $urlData
@param int $i
@return bool
This function check for duplicate of page It s need for SEO