• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/entity/widget.php
  • Класс: BitrixReportVisualConstructorEntityWidget
  • Вызов: Widget::getCurrentUserPatternedWidgets
static function getCurrentUserPatternedWidgets()
{
	global $USER;
	$userId = $USER->getId();
	$filter = Query::filter()
		->where('IS_PATTERN', '1')
		->where(Query::filter()
			->where(Query::filter()
				->where('OWNER_ID', $userId)
			)
			->logic('or')
			->where(Query::filter()
				->where('OWNER_ID', 0)
				->whereNot('CATEGORY_KEY', '')
			)
		);
	$widgets = static::getModelList(array(
		'select' => array('*'),
		'filter' => $filter,
		'order' => array('CREATED_DATE' => 'DESC'),
	));
	return $widgets ? $widgets : array();
}