You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: file_entity.install
+2-55Lines changed: 2 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -4,66 +4,13 @@
4
4
* @file
5
5
* Install, update and uninstall functions for the file_entity module.
6
6
*/
7
+
7
8
use Drupal\views\Entity\View;
8
9
9
10
/**
10
11
* Implements hook_schema().
11
12
*/
12
13
function file_entity_schema() {
13
-
$schema['file_display'] = array(
14
-
'description' => 'Stores configuration options for file displays.',
15
-
'fields' => array(
16
-
// @todo Can be refactored as a compond primary key after
17
-
// http://drupal.org/node/924236 is implemented.
18
-
'name' => array(
19
-
'description' => 'A combined string (FILE_TYPE__VIEW_MODE__FILE_FORMATTER) identifying a file display configuration. For integration with CTools Exportables, stored as a single string rather than as a compound primary key.',
20
-
'type' => 'varchar',
21
-
'length' => '255',
22
-
'not null' => TRUE,
23
-
),
24
-
'weight' => array(
25
-
'type' => 'int',
26
-
'not null' => TRUE,
27
-
'default' => 0,
28
-
'description' => 'Weight of formatter within the display chain for the associated file type and view mode. A file is rendered using the lowest weighted enabled display configuration that matches the file type and view mode and that is capable of displaying the file.',
29
-
),
30
-
'status' => array(
31
-
'type' => 'int',
32
-
'unsigned' => TRUE,
33
-
'not null' => TRUE,
34
-
'default' => 0,
35
-
'size' => 'tiny',
36
-
'description' => 'The status of the display. (1 = enabled, 0 = disabled)',
37
-
),
38
-
'settings' => array(
39
-
'type' => 'blob',
40
-
'not null' => FALSE,
41
-
'size' => 'big',
42
-
'serialize' => TRUE,
43
-
'description' => 'A serialized array of name value pairs that store the formatter settings for the display.',
44
-
),
45
-
),
46
-
'primary key' => array('name'),
47
-
// Exportable support via CTools.
48
-
'export' => array(
49
-
'key' => 'name',
50
-
'key name' => 'Name',
51
-
'primary key' => 'name',
52
-
// The {file_display}.status field is used to control whether the display
53
-
// is active in the display chain. CTools-level disabling is something
54
-
// different, and it's not yet clear how to interpret it for file
55
-
// displays. Until that's figured out, prevent CTools-level disabling.
56
-
'can disable' => FALSE,
57
-
'default hook' => 'file_default_displays',
58
-
'identifier' => 'file_display',
59
-
'api' => array(
60
-
'owner' => 'file_entity',
61
-
'api' => 'file_default_displays',
62
-
'minimum_version' => 1,
63
-
'current_version' => 1,
64
-
),
65
-
),
66
-
);
67
14
$schema['file_metadata'] = array(
68
15
'description' => 'Cache images dimensions.',
69
16
'fields' => array(
@@ -77,7 +24,7 @@ function file_entity_schema() {
77
24
'name' => array(
78
25
'description' => "The name of the metadata (e.g. 'width').",
0 commit comments