• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/taskitem.php
  • Класс: CTaskItem
  • Вызов: CTaskItem::getInstanceFromPool
static function getInstanceFromPool($taskId, $executiveUserId)
{
	CTaskAssert::assertLaxIntegers($taskId);
	CTaskAssert::assertLaxIntegers($executiveUserId);
	CTaskAssert::assert($taskId > 0);
	CTaskAssert::assert($executiveUserId > 0);

	$taskId = (int)$taskId;
	$executiveUserId = (int)$executiveUserId;

	$key = "{$taskId}|{$executiveUserId}";

	// Cache instance in pool
	if (!isset(self::$instances[$key]))
	{
		self::$instances[$key] = new self($taskId, $executiveUserId);
	}

	return self::$instances[$key];
}