--- /dev/null
+<?php
+/*
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ *
+ * @package CRM
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
+ */
+
+/**
+ * Track a list of known queues.
+ */
+class CRM_Queue_BAO_Queue extends CRM_Queue_DAO_Queue {
+
+ /**
+ * Get a list of valid queue types.
+ *
+ * @return string[]
+ */
+ public static function getTypes($context = NULL) {
+ return [
+ 'Memory' => ts('Memory (Linear)'),
+ 'Sql' => ts('SQL (Linear)'),
+ 'SqlParallel' => ts('SQL (Parallel)'),
+ ];
+ }
+
+}
*
* Generated from xml/schema/CRM/Queue/Queue.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a8717c39ea8ac6a7050400f33e42d64f)
+ * (GenCodeChecksum:08890bdce3ccfede0d5963b2a0a6fa98)
*/
/**
'where' => 'civicrm_queue.id',
'table_name' => 'civicrm_queue',
'entity' => 'Queue',
- 'bao' => 'CRM_Queue_DAO_Queue',
+ 'bao' => 'CRM_Queue_BAO_Queue',
'localizable' => 0,
'html' => [
'type' => 'Number',
'where' => 'civicrm_queue.name',
'table_name' => 'civicrm_queue',
'entity' => 'Queue',
- 'bao' => 'CRM_Queue_DAO_Queue',
+ 'bao' => 'CRM_Queue_BAO_Queue',
'localizable' => 0,
'html' => [
'type' => 'Text',
'where' => 'civicrm_queue.type',
'table_name' => 'civicrm_queue',
'entity' => 'Queue',
- 'bao' => 'CRM_Queue_DAO_Queue',
+ 'bao' => 'CRM_Queue_BAO_Queue',
'localizable' => 0,
'html' => [
'type' => 'Text',
],
+ 'pseudoconstant' => [
+ 'callback' => 'CRM_Queue_BAO_Queue::getTypes',
+ ],
'add' => '5.47',
],
'is_autorun' => [
'where' => 'civicrm_queue.is_autorun',
'table_name' => 'civicrm_queue',
'entity' => 'Queue',
- 'bao' => 'CRM_Queue_DAO_Queue',
+ 'bao' => 'CRM_Queue_BAO_Queue',
'localizable' => 0,
'html' => [
'type' => 'CheckBox',