StorageStrategy::getChildElements

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. StorageStrategy
  4. getChildElements
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Relation/StorageStrategy.php
  • Класс: Bitrix\Crm\Relation\StorageStrategy
  • Вызов: StorageStrategy::getChildElements
public function getChildElements(ItemIdentifier $parent, int $childEntityTypeId): array;

/**
 * Returns true if the items are bound
 *
 * @param ItemIdentifier $parent
 * @param ItemIdentifier $child
 *
 * @return bool
 */
abstract public function areItemsBound(ItemIdentifier $parent, ItemIdentifier $child): bool;

/**
 * Bind the provided items with each other
 *
 * @param ItemIdentifier $parent
 * @param ItemIdentifier $child
 *
 * @return Result
 */
public function bindItems(ItemIdentifier $parent, ItemIdentifier $child): Result
{
	if ($this->areItemsBound($parent, $child))
	{
		return (new Result())->addError(new Error(
				'The items are bound already',
				RelationManager::ERROR_CODE_BIND_ITEMS_ITEMS_ALREADY_BOUND
			));
	}

	return $this->createBinding($parent, $child);
}

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