From a7069ee82df8c319e674a4d4d60f142f52e5a1a7 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 20 Jan 2022 18:28:28 -0800 Subject: [PATCH] Queue XML/DAO/BAO - Add pseudoconstant for listing available types --- CRM/Queue/BAO/Queue.php | 36 ++++++++++++++++++++++++++++++++++++ CRM/Queue/DAO/Queue.php | 13 ++++++++----- xml/schema/Queue/Queue.xml | 3 +++ 3 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 CRM/Queue/BAO/Queue.php diff --git a/CRM/Queue/BAO/Queue.php b/CRM/Queue/BAO/Queue.php new file mode 100644 index 0000000000..4c5f027bf8 --- /dev/null +++ b/CRM/Queue/BAO/Queue.php @@ -0,0 +1,36 @@ + ts('Memory (Linear)'), + 'Sql' => ts('SQL (Linear)'), + 'SqlParallel' => ts('SQL (Parallel)'), + ]; + } + +} diff --git a/CRM/Queue/DAO/Queue.php b/CRM/Queue/DAO/Queue.php index 5801c12b39..1cae113da0 100644 --- a/CRM/Queue/DAO/Queue.php +++ b/CRM/Queue/DAO/Queue.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Queue/Queue.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:a8717c39ea8ac6a7050400f33e42d64f) + * (GenCodeChecksum:08890bdce3ccfede0d5963b2a0a6fa98) */ /** @@ -90,7 +90,7 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO { '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', @@ -109,7 +109,7 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO { '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', @@ -127,11 +127,14 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO { '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' => [ @@ -142,7 +145,7 @@ class CRM_Queue_DAO_Queue extends CRM_Core_DAO { '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', diff --git a/xml/schema/Queue/Queue.xml b/xml/schema/Queue/Queue.xml index e23c129b94..176f70b0e3 100644 --- a/xml/schema/Queue/Queue.xml +++ b/xml/schema/Queue/Queue.xml @@ -53,6 +53,9 @@ Text 5.47 + + CRM_Queue_BAO_Queue::getTypes + is_autorun -- 2.25.1