From c23ab0d1f7ca6985f873035c8801d0c3244cc2d2 Mon Sep 17 00:00:00 2001 From: Oleksander Piskun Date: Tue, 8 Apr 2025 20:45:37 +0300 Subject: fix(taskprocessing): use the event for AppAPI to get list of AI providers Signed-off-by: Oleksander Piskun --- .../Events/GetTaskProcessingProvidersEvent.php | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php (limited to 'lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php') diff --git a/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php b/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php new file mode 100644 index 00000000000..10c94d20406 --- /dev/null +++ b/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php @@ -0,0 +1,68 @@ +providers[] = $provider; + } + + /** + * Get all collected Task Processing Providers. + * + * @return IProvider[] + * @since 32.0.0 + */ + public function getProviders(): array { + return $this->providers; + } + + /** + * Add a custom Task Processing Task Type. + * + * @param ITaskType $taskType The task type instance to add. + * @since 32.0.0 + */ + public function addTaskType(ITaskType $taskType): void { + $this->taskTypes[] = $taskType; + } + + /** + * Get all collected custom Task Processing Task Types. + * + * @return ITaskType[] + * @since 32.0.0 + */ + public function getTaskTypes(): array { + return $this->taskTypes; + } +} -- cgit v1.2.3