Merge pull request #22848 from braders/extension-manager-notices
[civicrm-core.git] / CRM / Admin / Page / PreferencesDate.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
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 |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 */
17
18/**
ce064e4f 19 * Page for displaying list of location types.
6a488035
TO
20 */
21class CRM_Admin_Page_PreferencesDate extends CRM_Core_Page_Basic {
22
23 /**
eceb18cc 24 * The action links that we need to display for the browse screen.
6a488035
TO
25 *
26 * @var array
6a488035 27 */
62d3ee27 28 public static $_links = NULL;
6a488035 29
b5323902
CW
30 public $useLivePageJS = TRUE;
31
6a488035 32 /**
eceb18cc 33 * Get BAO Name.
6a488035 34 *
a6c01b45
CW
35 * @return string
36 * Classname of BAO.
6a488035 37 */
00be9182 38 public function getBAOName() {
6a488035
TO
39 return 'CRM_Core_BAO_PreferencesDate';
40 }
41
42 /**
eceb18cc 43 * Get action Links.
6a488035 44 *
a6c01b45
CW
45 * @return array
46 * (reference) of action links
6a488035 47 */
00be9182 48 public function &links() {
6a488035 49 if (!(self::$_links)) {
be2fb01f
CW
50 self::$_links = [
51 CRM_Core_Action::UPDATE => [
6a488035
TO
52 'name' => ts('Edit'),
53 'url' => 'civicrm/admin/setting/preferences/date',
54 'qs' => 'action=update&id=%%id%%&reset=1',
55 'title' => ts('Edit Date Type'),
be2fb01f
CW
56 ],
57 ];
6a488035
TO
58 }
59 return self::$_links;
60 }
61
62 /**
63 * Run the page.
64 *
65 * This method is called after the page is created. It checks for the
66 * type of action and executes that action.
67 * Finally it calls the parent's run method.
6a488035 68 */
00be9182 69 public function run() {
6a488035
TO
70 // set title and breadcrumb
71 CRM_Utils_System::setTitle(ts('Settings - Date Preferences'));
72 return parent::run();
73 }
74
75 /**
eceb18cc 76 * Get name of edit form.
6a488035 77 *
a6c01b45
CW
78 * @return string
79 * Classname of edit form.
6a488035 80 */
00be9182 81 public function editForm() {
6a488035
TO
82 return 'CRM_Admin_Form_PreferencesDate';
83 }
84
85 /**
eceb18cc 86 * Get edit form name.
6a488035 87 *
a6c01b45
CW
88 * @return string
89 * name of this page.
6a488035 90 */
00be9182 91 public function editName() {
6a488035
TO
92 return 'Date Preferences';
93 }
94
95 /**
96 * Get user context.
97 *
dd244018
EM
98 * @param null $mode
99 *
a6c01b45
CW
100 * @return string
101 * user context.
6a488035 102 */
00be9182 103 public function userContext($mode = NULL) {
6a488035
TO
104 return 'civicrm/admin/setting/preferences/date';
105 }
96025800 106
6a488035 107}