if (!defined('VOYAGER_PATH'))
{
    define(
        'VOYAGER_PATH',
        $modx->getOption('voyager_path', NULL, $modx->getOption('assets_path') . 'elements/snippets/Voyager/')
    );
}

require_once VOYAGER_PATH . 'helpers.php';
require_once VOYAGER_PATH . 'voyager.class.php';
$voyager = new Voyager($modx, array_merge($scriptProperties, array(
    'service' => 'megaMenu'
)));
return $voyager->run();