public function addPages($pages, $rootPage = null, $fromSiteMap = false, $language = null)
    {
        // Save the pages.
        $this->foundPages = $pages;
        unset($pages);

        // Run each entry in the published config array.
        foreach ($this->getConfigs() as $config) {
            if (!$config['published']) {
                continue;
            }
            $this->getMetaModelsPages(
                $config,
                $rootPage,
                $language
            );
        }

        asort($this->foundPages);

        // Return the new list.
        return $this->foundPages;
    }