From 4b9dbf4adef44b6944d4ba5bba877c3a810d1016 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 24 Jun 2023 20:32:15 -0500 Subject: [PATCH] Switch to autoLinks for ParticipantStatusType page --- CRM/Admin/Page/ParticipantStatusType.php | 34 ---------------------- CRM/Event/DAO/ParticipantStatusType.php | 13 ++++++++- xml/schema/Event/ParticipantStatusType.xml | 5 ++++ 3 files changed, 17 insertions(+), 35 deletions(-) diff --git a/CRM/Admin/Page/ParticipantStatusType.php b/CRM/Admin/Page/ParticipantStatusType.php index b4dba1a57d..4adbdd1679 100644 --- a/CRM/Admin/Page/ParticipantStatusType.php +++ b/CRM/Admin/Page/ParticipantStatusType.php @@ -27,40 +27,6 @@ class CRM_Admin_Page_ParticipantStatusType extends CRM_Core_Page_Basic { return 'CRM_Event_BAO_ParticipantStatusType'; } - /** - * @return array - */ - public function &links() { - static $links = NULL; - if ($links === NULL) { - $links = [ - CRM_Core_Action::UPDATE => [ - 'name' => ts('Edit'), - 'url' => 'civicrm/admin/participant_status', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Status'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/admin/participant_status', - 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete Status'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Status'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Status'), - ], - ]; - } - return $links; - } - public function browse() { $statusTypes = []; diff --git a/CRM/Event/DAO/ParticipantStatusType.php b/CRM/Event/DAO/ParticipantStatusType.php index c8f90aa306..6a8e2a936a 100644 --- a/CRM/Event/DAO/ParticipantStatusType.php +++ b/CRM/Event/DAO/ParticipantStatusType.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:8f6c30f03f591fc2069d17cd7152d5e0) + * (GenCodeChecksum:826624f3fa543f7c7a93439ddb53b150) */ /** @@ -38,6 +38,17 @@ class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO { */ public static $_log = TRUE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/admin/participant_status?action=add&reset=1', + 'update' => 'civicrm/admin/participant_status?action=update&id=[id]&reset=1', + 'delete' => 'civicrm/admin/participant_status?action=delete&id=[id]&reset=1', + ]; + /** * unique participant status type id * diff --git a/xml/schema/Event/ParticipantStatusType.xml b/xml/schema/Event/ParticipantStatusType.xml index 005dfc5a13..320a1d5b35 100644 --- a/xml/schema/Event/ParticipantStatusType.xml +++ b/xml/schema/Event/ParticipantStatusType.xml @@ -7,6 +7,11 @@ 3.0 true CiviEvent + + civicrm/admin/participant_status?action=add&reset=1 + civicrm/admin/participant_status?action=update&id=[id]&reset=1 + civicrm/admin/participant_status?action=delete&id=[id]&reset=1 + id Participant Status Type ID -- 2.25.1