Collection::filterByParentEntityTypeId

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Collection
  4. filterByParentEntityTypeId
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Relation/Collection.php
  • Класс: Bitrix\Crm\Relation\Collection
  • Вызов: Collection::filterByParentEntityTypeId
public function filterByParentEntityTypeId(int $parentEntityTypeId): Collection
{
	$filteredCollection = new static();

	foreach ($this->relations as $relation)
	{
		if ($relation->getParentEntityTypeId() === $parentEntityTypeId)
		{
			$filteredCollection->add($relation);
		}
	}

	return $filteredCollection;
}

Добавить комментарий