From 8656cd6bd2ddaf560bb6aa1f8a6ce93d31fd5f9a Mon Sep 17 00:00:00 2001 From: colemanw Date: Sun, 25 Jun 2023 00:39:11 -0400 Subject: [PATCH] Switch to autoLinks for MailingComponent page --- CRM/Mailing/DAO/MailingComponent.php | 12 +++++++- CRM/Mailing/Page/Component.php | 37 ------------------------- xml/schema/Mailing/MailingComponent.xml | 4 +++ 3 files changed, 15 insertions(+), 38 deletions(-) diff --git a/CRM/Mailing/DAO/MailingComponent.php b/CRM/Mailing/DAO/MailingComponent.php index 6d548f3058..1a0b2001d1 100644 --- a/CRM/Mailing/DAO/MailingComponent.php +++ b/CRM/Mailing/DAO/MailingComponent.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Mailing/MailingComponent.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:aa24935c1369d294b00f00cec1dd9623) + * (GenCodeChecksum:7ad429cf84e9bae091c8ea38beada696) */ /** @@ -31,6 +31,16 @@ class CRM_Mailing_DAO_MailingComponent extends CRM_Core_DAO { */ public static $_log = FALSE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/admin/component?action=add&reset=1', + 'update' => 'civicrm/admin/component?action=update&id=[id]&reset=1', + ]; + /** * @var int|string|null * (SQL type: int unsigned) diff --git a/CRM/Mailing/Page/Component.php b/CRM/Mailing/Page/Component.php index 860f3561ee..b723185377 100644 --- a/CRM/Mailing/Page/Component.php +++ b/CRM/Mailing/Page/Component.php @@ -21,13 +21,6 @@ */ class CRM_Mailing_Page_Component 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. * @@ -38,36 +31,6 @@ class CRM_Mailing_Page_Component extends CRM_Core_Page_Basic { return 'CRM_Mailing_BAO_MailingComponent'; } - /** - * 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' => CRM_Utils_System::currentPath(), - 'qs' => 'action=update&id=%%id%%', - 'title' => ts('Edit Mailing Component'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Mailing Component'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Mailing Component'), - ], - ]; - } - return self::$_links; - } - /** * Get name of edit form. * diff --git a/xml/schema/Mailing/MailingComponent.xml b/xml/schema/Mailing/MailingComponent.xml index e077a8b98b..7ef2d0e0c8 100644 --- a/xml/schema/Mailing/MailingComponent.xml +++ b/xml/schema/Mailing/MailingComponent.xml @@ -6,6 +6,10 @@ civicrm_mailing_component Stores information about the mailing components (header/footer). CiviMail + + civicrm/admin/component?action=add&reset=1 + civicrm/admin/component?action=update&id=[id]&reset=1 + id Mailing Component ID -- 2.25.1