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

