• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/objectify/collection.php
  • Класс: BitrixMainORMObjectifyCollection
  • Вызов: Collection::sysRemove
public function sysRemove($srPrimary)
{
	$object = $this->_objects[$srPrimary];

	if (empty($object))
	{
		$object = $this->entity->wakeUpObject($srPrimary);
	}

	unset($this->_objects[$srPrimary]);

	if (!isset($this->_objectsChanges[$srPrimary]) || $this->_objectsChanges[$srPrimary] != static::OBJECT_ADDED)
	{
		// regular remove
		$this->_objectsChanges[$srPrimary] = static::OBJECT_REMOVED;
		$this->_objectsRemoved[$srPrimary] = $object;
	}
	elseif (isset($this->_objectsChanges[$srPrimary]) && $this->_objectsChanges[$srPrimary] == static::OBJECT_ADDED)
	{
		// silent remove for added runtime
		unset($this->_objectsChanges[$srPrimary]);
		unset($this->_objectsRemoved[$srPrimary]);
	}
}