private function registerModuleSystemParams()
    {
        if (!count($this->systemParams)) {
            return;
        }
        /*
         * If a system entry already exists, then update it. Otherwise,
         * create a new one.
         */
        $system = $this->systemService->getActiveSystem();

        if (!$system) {
            $system = new System();
            $system->setNavigation([]);

            $this->em->persist($system);
        }

        if (!is_array($system->getNavigation())) {
            $system->setNavigation([]);
        }

        foreach ($this->systemParams as $moduleParams) {
            foreach ($moduleParams as $key => $params) {
                switch ($key) {
                    case 'navigation':
                        // Does the app override the modules' navigation?
                        if(
                            isset($this->appComposerJson['extra']) &&
                            isset($this->appComposerJson['extra']['campaignchain']) &&
                            isset($this->appComposerJson['extra']['campaignchain']['navigation'])
                        ) {
                            $system->setNavigation($this->appComposerJson['extra']['campaignchain']['navigation']);
                        } else {
                            // Merge existing navigations with new modules' navigation.
                            $navigation = array_merge_recursive($system->getNavigation(), $params);

                            $system->setNavigation($navigation);
                        }
                        break;
                }
            }
        }

        $this->em->flush();
    }