• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/item.php
  • Класс: BitrixTasksItem
  • Вызов: Item::getContext
public function getContext()
{
	if($this->context)
	{
		return $this->context;
	}

	$cache =& static::getCache();

	if(!is_array($cache['INSTANCES'] ?? null))
	{
		$cache['INSTANCES'] = array();
	}

	if(!isset($cache['INSTANCES']['CTX']))
	{
		$ctx = Context::getDefault();
		$cache['INSTANCES']['CTX'] = $ctx;
	}

	return $cache['INSTANCES']['CTX'];
}