This function will exit immediately after executing.
public redirectToIndex ( string $moduleToRedirect, string $actionToRedirect, integer | null $websiteId = null, string | null $defaultPeriod = null, string | null $defaultDate = null, array $parameters = [] ) | ||
$moduleToRedirect | string | The plugin to redirect to, eg. `"MultiSites"`. |
$actionToRedirect | string | Action, eg. `"index"`. |
$websiteId | integer | null | The new idSite query parameter, eg, `1`. |
$defaultPeriod | string | null | The new period query parameter, eg, `'day'`. |
$defaultDate | string | null | The new date query parameter, eg, `'today'`. |
$parameters | array | Other query parameters to append to the URL. |