- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/provider/taskprovider.php
- Класс: BitrixTasksProviderTaskProvider
- Вызов: TaskProvider::configure
private function configure($arOrder = [], $arFilter = [], $arSelect = [], $arParams = [], array $arGroup = []): void
{
$this->arOrder = is_array($arOrder) ? $arOrder: [];
$this->arFilter = $arFilter;
$this->arSelect = $arSelect;
$this->arParams = $arParams;
$this->arGroup = $arGroup;
if ( !is_array($this->arParams) )
{
$this->nPageTop = $this->arParams;
$this->arParams = false;
}
else
{
if (isset($this->arParams['nPageTop']))
{
$this->nPageTop = $this->arParams['nPageTop'];
}
if (isset($this->arParams['bIgnoreErrors']))
{
// $this->bIgnoreErrors = (bool) $this->arParams['bIgnoreErrors'];
}
if (isset($this->arParams['bIgnoreDbErrors']))
{
$this->bIgnoreDbErrors = (bool) $this->arParams['bIgnoreDbErrors'];
}
if (isset($this->arParams['bSkipUserFields']))
{
$this->bSkipUserFields = (bool) $this->arParams['bSkipUserFields'];
}
if (isset($this->arParams['bSkipExtraTables']))
{
$this->bSkipExtraTables = (bool) $this->arParams['bSkipExtraTables'];
}
if (isset($this->arParams['bSkipJoinTblViewed']))
{
$this->bSkipJoinTblViewed = (bool) $this->arParams['bSkipJoinTblViewed'];
}
if (isset($this->arParams['bNeedJoinMembersTable']))
{
$this->bNeedJoinMembersTable = (bool) $this->arParams['bNeedJoinMembersTable'];
}
}
if (!in_array('MESSAGE_ID', $this->arSelect))
{
$this->deleteMessageId = true;
}
$this->disableOptimization = (is_array($this->arParams) && array_key_exists('DISABLE_OPTIMIZATION', $this->arParams) && $this->arParams['DISABLE_OPTIMIZATION'] === true);
$this->useAccessAsWhere = !(is_array($this->arParams) && array_key_exists('DISABLE_ACCESS_OPTIMIZATION', $this->arParams) && $this->arParams['DISABLE_ACCESS_OPTIMIZATION'] === true);
$this->canUseOptimization = !$this->disableOptimization && !$this->bNeedJoinMembersTable;
// First level logic MUST be 'AND', because of backward compatibility
// and some requests for checking rights, attached at first level of filter.
// Situtation when there is OR-logic at first level cannot be resolved
// in general case.
// So if there is OR-logic, it is FATAL error caused by programmer.
// But, if you want to use OR-logic at the first level of filter, you
// can do this by putting all your filter conditions to the ::SUBFILTER-xxx,
// except CHECK_PERMISSIONS, SUBORDINATE_TASKS (if you don't know exactly,
// what are consequences of this fields in OR-logic of subfilters).
if (isset($this->arFilter['::LOGIC']))
{
CTaskAssert::assert($this->arFilter['::LOGIC'] === 'AND');
}
$this->bIgnoreErrors = false;
$this->invokeUserTypeSql();
$this->setUserId();
if (
is_array($this->arParams)
&& array_key_exists('NAV_PARAMS', $this->arParams)
&& is_array($this->arParams['NAV_PARAMS'])
&& array_key_exists('getPlusOne', $this->arParams['NAV_PARAMS'])
)
{
$this->getPlusOne = $this->arParams['NAV_PARAMS']['getPlusOne'];
}
}