From d30bed3d4250c1c0bc76baa62395c096669515b9 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 24 Jun 2023 19:51:33 -0500 Subject: [PATCH] Switch to autoLinks for contactType and locationType --- CRM/Admin/Page/ContactType.php | 43 --------------------------------- CRM/Admin/Page/LocationType.php | 43 --------------------------------- 2 files changed, 86 deletions(-) diff --git a/CRM/Admin/Page/ContactType.php b/CRM/Admin/Page/ContactType.php index 593c583f3c..526b11194c 100644 --- a/CRM/Admin/Page/ContactType.php +++ b/CRM/Admin/Page/ContactType.php @@ -22,13 +22,6 @@ class CRM_Admin_Page_ContactType extends CRM_Core_Page_Basic { public $useLivePageJS = TRUE; - /** - * The action links that we need to display for the browse screen. - * - * @var array - */ - public static $_links = NULL; - /** * Get BAO Name. * @@ -39,42 +32,6 @@ class CRM_Admin_Page_ContactType extends CRM_Core_Page_Basic { return 'CRM_Contact_BAO_ContactType'; } - /** - * 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/options/subtype/edit', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Contact Type'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Contact Type'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Contact Type'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/admin/options/subtype/edit', - 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete Contact Type'), - ], - ]; - } - return self::$_links; - } - /** * Run page. */ diff --git a/CRM/Admin/Page/LocationType.php b/CRM/Admin/Page/LocationType.php index cb4ef709eb..17896dae90 100644 --- a/CRM/Admin/Page/LocationType.php +++ b/CRM/Admin/Page/LocationType.php @@ -22,13 +22,6 @@ class CRM_Admin_Page_LocationType extends CRM_Core_Page_Basic { public $useLivePageJS = TRUE; - /** - * The action links that we need to display for the browse screen. - * - * @var array - */ - public static $_links = NULL; - /** * Get BAO Name. * @@ -39,42 +32,6 @@ class CRM_Admin_Page_LocationType extends CRM_Core_Page_Basic { return 'CRM_Core_BAO_LocationType'; } - /** - * 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/locationType/edit', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Location Type'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Location Type'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Location Type'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/admin/locationType/edit', - 'qs' => 'action=delete&id=%%id%%', - 'title' => ts('Delete Location Type'), - ], - ]; - } - return self::$_links; - } - /** * Get name of edit form. * -- 2.25.1