From 8fe88a7731c438868b7caceb4495339785397602 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 24 Jun 2023 20:20:30 -0500 Subject: [PATCH] Switch to autoLinks for PaymentProcessorType page --- CRM/Admin/Page/PaymentProcessorType.php | 43 ------------------- CRM/Financial/DAO/PaymentProcessorType.php | 13 +++++- xml/schema/Financial/PaymentProcessorType.xml | 5 +++ 3 files changed, 17 insertions(+), 44 deletions(-) diff --git a/CRM/Admin/Page/PaymentProcessorType.php b/CRM/Admin/Page/PaymentProcessorType.php index 8dd81c1b8d..6db77c50a5 100644 --- a/CRM/Admin/Page/PaymentProcessorType.php +++ b/CRM/Admin/Page/PaymentProcessorType.php @@ -20,13 +20,6 @@ */ class CRM_Admin_Page_PaymentProcessorType extends CRM_Core_Page_Basic { - /** - * The action links that we need to display for the browse screen. - * - * @var array - */ - public static $_links = NULL; - /** * Get BAO Name. * @@ -37,42 +30,6 @@ class CRM_Admin_Page_PaymentProcessorType extends CRM_Core_Page_Basic { return 'CRM_Financial_BAO_PaymentProcessorType'; } - /** - * Get action Links. - * - * @return array - * (reference) of action links - */ - public function &links() { - if (!(self::$_links)) { - self::$_links = [ - CRM_Core_Action::UPDATE => [ - 'name' => ts('Edit'), - 'url' => 'civicrm/admin/paymentProcessorType', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Payment ProcessorType'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Payment ProcessorType'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Payment ProcessorType'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/admin/paymentProcessorType', - 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete Payment ProcessorType'), - ], - ]; - } - return self::$_links; - } - /** * Get name of edit form. * diff --git a/CRM/Financial/DAO/PaymentProcessorType.php b/CRM/Financial/DAO/PaymentProcessorType.php index 6cd9a6a7b4..702a8b55d2 100644 --- a/CRM/Financial/DAO/PaymentProcessorType.php +++ b/CRM/Financial/DAO/PaymentProcessorType.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:4ce6f72edd24847c4ec8fe29c9530363) + * (GenCodeChecksum:c0f54fc4f1f69c631c0c2e89537c6194) */ /** @@ -38,6 +38,17 @@ class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO { */ public static $_log = FALSE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/admin/paymentProcessorType?reset=1&action=add', + 'delete' => 'civicrm/admin/paymentProcessorType?reset=1&action=delete&id=[id]', + 'update' => 'civicrm/admin/paymentProcessorType?reset=1&action=update&id=[id]', + ]; + /** * Payment Processor Type ID * diff --git a/xml/schema/Financial/PaymentProcessorType.xml b/xml/schema/Financial/PaymentProcessorType.xml index 149134ea12..8a490436d3 100644 --- a/xml/schema/Financial/PaymentProcessorType.xml +++ b/xml/schema/Financial/PaymentProcessorType.xml @@ -6,6 +6,11 @@ civicrm_payment_processor_type 1.8 CiviContribute + + civicrm/admin/paymentProcessorType?reset=1&action=add + civicrm/admin/paymentProcessorType?reset=1&action=delete&id=[id] + civicrm/admin/paymentProcessorType?reset=1&action=update&id=[id] + id Payment Processor Type ID -- 2.25.1