1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Default display configuration for the default file types.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_file_default_displays().
|
10
|
*/
|
11
|
function file_entity_file_default_displays() {
|
12
|
$file_displays = array();
|
13
|
|
14
|
$file_display = new stdClass();
|
15
|
$file_display->api_version = 1;
|
16
|
$file_display->name = 'audio__default__file_field_file_audio';
|
17
|
$file_display->weight = 50;
|
18
|
$file_display->status = TRUE;
|
19
|
$file_display->settings = array(
|
20
|
'controls' => 1,
|
21
|
'autoplay' => 0,
|
22
|
'loop' => 0,
|
23
|
'multiple_file_behavior' => 'tags',
|
24
|
);
|
25
|
$file_displays['audio__default__file_field_file_audio'] = $file_display;
|
26
|
|
27
|
$file_display = new stdClass();
|
28
|
$file_display->api_version = 1;
|
29
|
$file_display->name = 'audio__preview__file_field_file_default';
|
30
|
$file_display->weight = 50;
|
31
|
$file_display->status = TRUE;
|
32
|
$file_display->settings = '';
|
33
|
$file_displays['audio__preview__file_field_file_default'] = $file_display;
|
34
|
|
35
|
$file_display = new stdClass();
|
36
|
$file_display->api_version = 1;
|
37
|
$file_display->name = 'audio__teaser__file_field_file_audio';
|
38
|
$file_display->weight = 50;
|
39
|
$file_display->status = TRUE;
|
40
|
$file_display->settings = array(
|
41
|
'controls' => 1,
|
42
|
'autoplay' => 0,
|
43
|
'loop' => 0,
|
44
|
'multiple_file_behavior' => 'tags',
|
45
|
);
|
46
|
$file_displays['audio__teaser__file_field_file_audio'] = $file_display;
|
47
|
|
48
|
$file_display = new stdClass();
|
49
|
$file_display->api_version = 1;
|
50
|
$file_display->name = 'document__default__file_field_file_default';
|
51
|
$file_display->weight = 50;
|
52
|
$file_display->status = TRUE;
|
53
|
$file_display->settings = '';
|
54
|
$file_displays['document__default__file_field_file_default'] = $file_display;
|
55
|
|
56
|
$file_display = new stdClass();
|
57
|
$file_display->api_version = 1;
|
58
|
$file_display->name = 'document__preview__file_field_file_default';
|
59
|
$file_display->weight = 50;
|
60
|
$file_display->status = TRUE;
|
61
|
$file_display->settings = '';
|
62
|
$file_displays['document__preview__file_field_file_default'] = $file_display;
|
63
|
|
64
|
$file_display = new stdClass();
|
65
|
$file_display->api_version = 1;
|
66
|
$file_display->name = 'document__teaser__file_field_file_default';
|
67
|
$file_display->weight = 50;
|
68
|
$file_display->status = TRUE;
|
69
|
$file_display->settings = '';
|
70
|
$file_displays['document__teaser__file_field_file_default'] = $file_display;
|
71
|
|
72
|
$file_display = new stdClass();
|
73
|
$file_display->api_version = 1;
|
74
|
$file_display->name = 'image__default__file_field_file_default';
|
75
|
$file_display->weight = 50;
|
76
|
$file_display->status = TRUE;
|
77
|
$file_display->settings = '';
|
78
|
$file_displays['image__default__file_field_file_default'] = $file_display;
|
79
|
|
80
|
$file_display = new stdClass();
|
81
|
$file_display->api_version = 1;
|
82
|
$file_display->name = 'image__preview__file_field_file_default';
|
83
|
$file_display->weight = 50;
|
84
|
$file_display->status = TRUE;
|
85
|
$file_display->settings = '';
|
86
|
$file_displays['image__preview__file_field_file_default'] = $file_display;
|
87
|
|
88
|
$file_display = new stdClass();
|
89
|
$file_display->api_version = 1;
|
90
|
$file_display->name = 'image__teaser__file_field_file_default';
|
91
|
$file_display->weight = 50;
|
92
|
$file_display->status = TRUE;
|
93
|
$file_display->settings = '';
|
94
|
$file_displays['image__teaser__file_field_file_default'] = $file_display;
|
95
|
|
96
|
// Enhance the default image displays if the Image module is enabled.
|
97
|
if (module_exists('image')) {
|
98
|
// Images should be displayed as unstyled images by default.
|
99
|
$file_display = new stdClass();
|
100
|
$file_display->api_version = 1;
|
101
|
$file_display->name = 'image__default__file_field_image';
|
102
|
$file_display->weight = 48;
|
103
|
$file_display->status = TRUE;
|
104
|
$file_display->settings = array(
|
105
|
'image_style' => '',
|
106
|
'image_link' => '',
|
107
|
);
|
108
|
$file_displays['image__default__file_field_image'] = $file_display;
|
109
|
|
110
|
// Image previews should be displayed as image thumbnails by default.
|
111
|
$file_display = new stdClass();
|
112
|
$file_display->api_version = 1;
|
113
|
$file_display->name = 'image__preview__file_field_image';
|
114
|
$file_display->weight = 48;
|
115
|
$file_display->status = TRUE;
|
116
|
$file_display->settings = array(
|
117
|
'image_style' => 'thumbnail',
|
118
|
'image_link' => '',
|
119
|
);
|
120
|
$file_displays['image__preview__file_field_image'] = $file_display;
|
121
|
|
122
|
// Image teasers should be displayed as medium images by default.
|
123
|
$file_display = new stdClass();
|
124
|
$file_display->api_version = 1;
|
125
|
$file_display->name = 'image__teaser__file_field_image';
|
126
|
$file_display->weight = 48;
|
127
|
$file_display->status = TRUE;
|
128
|
$file_display->settings = array(
|
129
|
'image_style' => 'medium',
|
130
|
'image_link' => 'content',
|
131
|
);
|
132
|
$file_displays['image__teaser__file_field_image'] = $file_display;
|
133
|
}
|
134
|
|
135
|
$file_display = new stdClass();
|
136
|
$file_display->api_version = 1;
|
137
|
$file_display->name = 'video__default__file_field_file_video';
|
138
|
$file_display->weight = 50;
|
139
|
$file_display->status = TRUE;
|
140
|
$file_display->settings = array(
|
141
|
'controls' => 1,
|
142
|
'autoplay' => 0,
|
143
|
'loop' => 0,
|
144
|
'width' => '',
|
145
|
'height' => '',
|
146
|
'multiple_file_behavior' => 'tags',
|
147
|
);
|
148
|
$file_displays['video__default__file_field_file_video'] = $file_display;
|
149
|
|
150
|
$file_display = new stdClass();
|
151
|
$file_display->api_version = 1;
|
152
|
$file_display->name = 'video__preview__file_field_file_default';
|
153
|
$file_display->weight = 50;
|
154
|
$file_display->status = TRUE;
|
155
|
$file_display->settings = '';
|
156
|
$file_displays['video__preview__file_field_file_default'] = $file_display;
|
157
|
|
158
|
$file_display = new stdClass();
|
159
|
$file_display->api_version = 1;
|
160
|
$file_display->name = 'video__teaser__file_field_file_video';
|
161
|
$file_display->weight = 50;
|
162
|
$file_display->status = TRUE;
|
163
|
$file_display->settings = array(
|
164
|
'controls' => 1,
|
165
|
'autoplay' => 0,
|
166
|
'loop' => 0,
|
167
|
'width' => '',
|
168
|
'height' => '',
|
169
|
'multiple_file_behavior' => 'tags',
|
170
|
);
|
171
|
$file_displays['video__teaser__file_field_file_video'] = $file_display;
|
172
|
|
173
|
return $file_displays;
|
174
|
}
|