Метод findByTemplateId

public

Сигнатура метода

public function findByTemplateId(int $templateId): ?ManagedAgentInstance

Возвращает: ?ManagedAgentInstance

Описание

Answers which instance owns the template, and nothing else. The barrier of the registry needs one answer more than this - it has to tell an unmanaged template from a template that is already gone - so it reads the template row and the instance in one joined query instead of calling this method. That leaves the method without a caller of the product today: it stays as the reading of the unique key ux_bp_ma_instance_template, which the cases and a diagnostic of a copy use. It is kept on purpose and is not dead: this is the entry point a copy deleted out of band needs, where the instance stays enabled and no background pass selects it, and the template id is the only thing such a discovery starts from.

Параметры

1
Имя Тип По умолчанию Флаги
$templateId int —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/Internal/Repository/AiAgent/ManagedAgentInstanceRepository.php
Расположение метода в файле
Строки 63–71

Исходный код

PHP