- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/classes/general/taskliststate.php
- Класс: CTaskListState
- Вызов: CTaskListState::__construct
private function __construct($userId, int $groupId = 0)
{
CTaskAssert::assertLaxIntegers($userId);
CTaskAssert::assert($userId > 0);
$this->userId = $userId;
$paramName = self::listViewModeParamName;
if ($groupId)
{
$paramName .= '_'.$groupId;
}
$this->resetState();
$rc = CUserOptions::GetOption(
self::listCategoryName,
$paramName,
serialize(false),
$this->userId
);
$state = unserialize($rc, ['allowed_classes' => false]);
if (is_array($state))
{
$this->state = array_merge($this->state, $state);
}
if (
BitrixTasksUtilUser::getId()
&& BitrixTasksUtilUser::isAuthorized()
)
{
$this->loggedInUserId = (int) BitrixTasksUtilUser::getId();
$this->paramName = $paramName . '_by_user_' . $this->loggedInUserId;
$rc = CUserOptions::GetOption(
self::listCategoryName,
$this->paramName,
serialize(false),
$this->userId
);
$state = unserialize($rc, ['allowed_classes' => false]);
if (is_array($state))
{
$this->state = array_merge($this->state, $state);
}
}
}