• Модуль: forum
  • Путь к файлу: ~/bitrix/modules/forum/lib/comments/baseobject.php
  • Класс: BitrixForumCommentsBaseObject
  • Вызов: BaseObject::__construct
public function __construct($forumId, $entity, $userId = null)
{
	global $USER;
	$this->errorCollection = new ErrorCollection();
	if (is_null($userId))
	{
		$userId = ($USER instanceof CUser ? $USER->getId() : 0);
	}
	else
	{
		$userId = intval($userId);
	}
	$this->setUser($userId);

	$this->setForum($forumId);
	$this->setEntity($entity);
	$this->setTopic();
}