| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | Copyright CiviCRM LLC. All rights reserved. | |
| 5 | | | |
| 6 | | This work is published under the GNU AGPLv3 license with some | |
| 7 | | permitted exceptions and without any warranty. For full license | |
| 8 | | and copyright information, see https://civicrm.org/licensing | |
| 9 | +--------------------------------------------------------------------+ |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * |
| 14 | * @package CRM |
| 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
| 16 | */ |
| 17 | |
| 18 | /** |
| 19 | * Page for displaying list of payment processors. |
| 20 | */ |
| 21 | class CRM_Admin_Page_PaymentProcessorType extends CRM_Core_Page_Basic { |
| 22 | |
| 23 | /** |
| 24 | * The action links that we need to display for the browse screen. |
| 25 | * |
| 26 | * @var array |
| 27 | */ |
| 28 | public static $_links = NULL; |
| 29 | |
| 30 | /** |
| 31 | * Get BAO Name. |
| 32 | * |
| 33 | * @return string |
| 34 | * Classname of BAO. |
| 35 | */ |
| 36 | public function getBAOName() { |
| 37 | return 'CRM_Financial_BAO_PaymentProcessorType'; |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Get action Links. |
| 42 | * |
| 43 | * @return array |
| 44 | * (reference) of action links |
| 45 | */ |
| 46 | public function &links() { |
| 47 | if (!(self::$_links)) { |
| 48 | self::$_links = [ |
| 49 | CRM_Core_Action::UPDATE => [ |
| 50 | 'name' => ts('Edit'), |
| 51 | 'url' => 'civicrm/admin/paymentProcessorType', |
| 52 | 'qs' => 'action=update&id=%%id%%&reset=1', |
| 53 | 'title' => ts('Edit Payment ProcessorType'), |
| 54 | ], |
| 55 | CRM_Core_Action::DISABLE => [ |
| 56 | 'name' => ts('Disable'), |
| 57 | 'ref' => 'crm-enable-disable', |
| 58 | 'title' => ts('Disable Payment ProcessorType'), |
| 59 | ], |
| 60 | CRM_Core_Action::ENABLE => [ |
| 61 | 'name' => ts('Enable'), |
| 62 | 'ref' => 'crm-enable-disable', |
| 63 | 'title' => ts('Enable Payment ProcessorType'), |
| 64 | ], |
| 65 | CRM_Core_Action::DELETE => [ |
| 66 | 'name' => ts('Delete'), |
| 67 | 'url' => 'civicrm/admin/paymentProcessorType', |
| 68 | 'qs' => 'action=delete&id=%%id%%', |
| 69 | 'title' => ts('Delete Payment ProcessorType'), |
| 70 | ], |
| 71 | ]; |
| 72 | } |
| 73 | return self::$_links; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Get name of edit form. |
| 78 | * |
| 79 | * @return string |
| 80 | * Classname of edit form. |
| 81 | */ |
| 82 | public function editForm() { |
| 83 | return 'CRM_Admin_Form_PaymentProcessorType'; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Get edit form name. |
| 88 | * |
| 89 | * @return string |
| 90 | * name of this page. |
| 91 | */ |
| 92 | public function editName() { |
| 93 | return 'Payment Processor Type'; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Get user context. |
| 98 | * |
| 99 | * @param null $mode |
| 100 | * |
| 101 | * @return string |
| 102 | * user context. |
| 103 | */ |
| 104 | public function userContext($mode = NULL) { |
| 105 | return 'civicrm/admin/paymentProcessorType'; |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Get any properties that should always be present in each row (null if no value). |
| 110 | * |
| 111 | * @return array |
| 112 | */ |
| 113 | protected function getExpectedRowProperties(): array { |
| 114 | return ['class', 'description']; |
| 115 | } |
| 116 | |
| 117 | } |