From: colemanw Date: Sun, 25 Jun 2023 00:52:48 +0000 (-0500) Subject: Switch to autoLinks for DatePreferences page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=81fcec5ae59c3f96febf4c1aab69f96148b94bee;p=civicrm-core.git Switch to autoLinks for DatePreferences page --- diff --git a/CRM/Admin/Page/PreferencesDate.php b/CRM/Admin/Page/PreferencesDate.php index 65e65fe1a5..17d0c6b5a6 100644 --- a/CRM/Admin/Page/PreferencesDate.php +++ b/CRM/Admin/Page/PreferencesDate.php @@ -20,13 +20,6 @@ */ class CRM_Admin_Page_PreferencesDate extends CRM_Core_Page_Basic { - /** - * The action links that we need to display for the browse screen. - * - * @var array - */ - public static $_links = NULL; - public $useLivePageJS = TRUE; /** @@ -39,26 +32,6 @@ class CRM_Admin_Page_PreferencesDate extends CRM_Core_Page_Basic { return 'CRM_Core_BAO_PreferencesDate'; } - /** - * 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/setting/preferences/date', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Edit Date Type'), - ], - ]; - } - return self::$_links; - } - /** * Run the page. * diff --git a/CRM/Core/DAO/PreferencesDate.php b/CRM/Core/DAO/PreferencesDate.php index e0d6bdb528..f6c1f48e00 100644 --- a/CRM/Core/DAO/PreferencesDate.php +++ b/CRM/Core/DAO/PreferencesDate.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/PreferencesDate.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:3f9c7b68e9dc1f9a677731328ffa5947) + * (GenCodeChecksum:c83fafaf0b7ee8513ce6de9844d7a729) */ /** @@ -30,6 +30,15 @@ class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO { */ public static $_log = TRUE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'update' => 'civicrm/admin/setting/preferences/date?reset=1&action=update&id=[id]', + ]; + /** * @var int|string|null * (SQL type: int unsigned) @@ -106,7 +115,7 @@ class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO { * Whether to return the plural version of the title. */ public static function getEntityTitle($plural = FALSE) { - return $plural ? ts('Preferences Dates') : ts('Preferences Date'); + return $plural ? ts('Date Preferences') : ts('Date Preference'); } /** diff --git a/xml/schema/Core/PreferencesDate.xml b/xml/schema/Core/PreferencesDate.xml index 809d49d71f..6b6439e563 100644 --- a/xml/schema/Core/PreferencesDate.xml +++ b/xml/schema/Core/PreferencesDate.xml @@ -7,6 +7,10 @@ Define date preferences for the site 2.0 true + Date Preference + + civicrm/admin/setting/preferences/date?reset=1&action=update&id=[id] + id Date Preference ID