method
public
ComponentController::redirectTo()
Сигнатура
public redirectTo(string $url) : Redirect
Описание
Перенаправление на URL.
Параметры
$url
string
Возвращаемое значение
Redirect
Как применяется в ComponentController
ComponentController::redirectTo() — метод класса \Bitrix\Main\Engine\Component\ComponentController модуля «Главный модуль».
Метод объекта: сначала нужен экземпляр ComponentController.
use Bitrix\Main\Engine\Component\ComponentController;
/** @var ComponentController $object */
$url = '';
$result = $object->redirectTo($url);
// $result: RedirectДругие методы ComponentController
className()Возвращает полностью квалифицированное имя этого класса.configureActions()convertKeysToCamelCase()Преобразует ключи массива в нотацию camelCase.finalizeResponse()Финализирует ответ.forward()generateActionMethodName()getActionUri()Возвращает uri для ajax-эндпоинта по имени действия. Это вспомогательный метод, который использует относительное имя…getAutoWiredParameters()getConfigurationOfActions()getCurrentUser()getDefaultAutoWiredParameters()getErrorByCode()Получение единственной ошибки с необходимым кодом.
redirectTo() есть и у других классов модуля «Главный модуль»: AjaxJson, Archive, Base, BFile, Component, Component, Controller, DefaultController.
Исходный файл: source/main/lib/engine/component/componentcontroller.php:1059

