APIv4 - smarter parsing of Entity docblocks
[civicrm-core.git] / CRM / Admin / Page / PreferencesDate.php
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 location types.
20 */
21 class CRM_Admin_Page_PreferencesDate 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 public $useLivePageJS = TRUE;
31
32 /**
33 * Get BAO Name.
34 *
35 * @return string
36 * Classname of BAO.
37 */
38 public function getBAOName() {
39 return 'CRM_Core_BAO_PreferencesDate';
40 }
41
42 /**
43 * Get action Links.
44 *
45 * @return array
46 * (reference) of action links
47 */
48 public function &links() {
49 if (!(self::$_links)) {
50 self::$_links = [
51 CRM_Core_Action::UPDATE => [
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'),
56 ],
57 ];
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.
68 */
69 public function run() {
70 // set title and breadcrumb
71 CRM_Utils_System::setTitle(ts('Settings - Date Preferences'));
72 return parent::run();
73 }
74
75 /**
76 * Get name of edit form.
77 *
78 * @return string
79 * Classname of edit form.
80 */
81 public function editForm() {
82 return 'CRM_Admin_Form_PreferencesDate';
83 }
84
85 /**
86 * Get edit form name.
87 *
88 * @return string
89 * name of this page.
90 */
91 public function editName() {
92 return 'Date Preferences';
93 }
94
95 /**
96 * Get user context.
97 *
98 * @param null $mode
99 *
100 * @return string
101 * user context.
102 */
103 public function userContext($mode = NULL) {
104 return 'civicrm/admin/setting/preferences/date';
105 }
106
107 }