forked from statamic/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCorePreferences.php
69 lines (64 loc) · 2.08 KB
/
CorePreferences.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace Statamic\Preferences;
use Statamic\Facades\Preference;
class CorePreferences
{
public function boot()
{
Preference::register('locale', [
'type' => 'select',
'display' => __('Locale'),
'instructions' => __('statamic::messages.preference_locale_instructions'),
'clearable' => true,
'options' => [
'da' => 'Danish',
'de' => 'German',
'de_CH' => 'German (Switzerland)',
'en' => 'English',
'es' => 'Spanish',
'fr' => 'French',
'hu' => 'Hungarian',
'id' => 'Indonesian',
'it' => 'Italian',
'ms' => 'Malay',
'nb' => 'Norwegian',
'nl' => 'Dutch',
'pl' => 'Polish',
'pt' => 'Portuguese',
'pt_BR' => 'Portuguese (Brazil)',
'ru' => 'Russian',
'sl' => 'Slovenian',
'sv' => 'Swedish',
'tr' => 'Turkish',
'zh_CN' => 'Chinese (China)',
'zh_TW' => 'Chinese (Taiwan)',
],
]);
Preference::register('start_page', [
'type' => 'text',
'display' => __('Start Page'),
'instructions' => __('statamic::messages.preference_start_page_instructions'),
]);
Preference::register('favorites', [
'type' => 'grid',
'display' => __('Favorites'),
'instructions' => __('statamic::messages.preference_favorites_instructions'),
'fields' => [
[
'handle' => 'name',
'field' => [
'type' => 'text',
'width' => 33,
],
],
[
'handle' => 'url',
'field' => [
'display' => 'URL',
'type' => 'text',
],
],
],
]);
}
}