forked from phase2/oa_media
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoa_media.features.inc
103 lines (101 loc) · 3.66 KB
/
oa_media.features.inc
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* @file
* oa_media.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function oa_media_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "file_entity" && $api == "file_default_displays") {
return array("version" => "1");
}
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
/**
* Implements hook_views_default_views_alter().
*/
function oa_media_views_default_views_alter(&$data) {
if (isset($data['media_default'])) {
$data['media_default']->display['default']->display_options['filters']['oa_section_ref_target_id'] = array(
'id' => 'oa_section_ref_target_id',
'table' => 'field_data_oa_section_ref',
'field' => 'oa_section_ref_target_id',
'relationship' => 'reverse_field_oa_media_node',
'exposed' => TRUE,
'expose' => array(
'operator_id' => 'oa_section_ref_target_id_op',
'label' => 'Section',
'operator' => 'oa_section_ref_target_id_op',
'identifier' => 'oa_section_ref_target_id',
),
); /* WAS: '' */
$data['media_default']->display['default']->display_options['filters']['og_group_ref_target_id'] = array(
'id' => 'og_group_ref_target_id',
'table' => 'og_membership',
'field' => 'og_group_ref_target_id',
'relationship' => 'reverse_field_oa_media_node',
'exposed' => TRUE,
'expose' => array(
'operator_id' => 'og_group_ref_target_id_op',
'label' => 'Space',
'operator' => 'og_group_ref_target_id_op',
'identifier' => 'og_group_ref_target_id',
'remember_roles' => array(
2 => 2,
1 => 0,
3 => 0,
4 => 0,
),
),
); /* WAS: '' */
$data['media_default']->display['default']->display_options['relationships'] = array(
'reverse_field_oa_media_node' => array(
'id' => 'reverse_field_oa_media_node',
'table' => 'file_managed',
'field' => 'reverse_field_oa_media_node',
),
); /* WAS: '' */
$data['media_default']->display['media_browser_my_files']->display_options['filters']['oa_section_ref_target_id'] = array(
'id' => 'oa_section_ref_target_id',
'table' => 'field_data_oa_section_ref',
'field' => 'oa_section_ref_target_id',
'relationship' => 'reverse_field_oa_media_node',
'exposed' => TRUE,
'expose' => array(
'operator_id' => 'oa_section_ref_target_id_op',
'label' => 'Section',
'operator' => 'oa_section_ref_target_id_op',
'identifier' => 'oa_section_ref_target_id',
),
); /* WAS: '' */
$data['media_default']->display['media_browser_my_files']->display_options['filters']['og_group_ref_target_id'] = array(
'id' => 'og_group_ref_target_id',
'table' => 'og_membership',
'field' => 'og_group_ref_target_id',
'relationship' => 'reverse_field_oa_media_node',
'exposed' => TRUE,
'expose' => array(
'operator_id' => 'og_group_ref_target_id_op',
'label' => 'Space',
'operator' => 'og_group_ref_target_id_op',
'identifier' => 'og_group_ref_target_id',
'remember_roles' => array(
2 => 2,
1 => 0,
3 => 0,
4 => 0,
),
),
); /* WAS: '' */
$data['media_default']->display['media_browser_my_files']->display_options['relationships']['reverse_field_oa_media_node'] = array(
'id' => 'reverse_field_oa_media_node',
'table' => 'file_managed',
'field' => 'reverse_field_oa_media_node',
'label' => 'field_oa_media_1',
); /* WAS: '' */
unset($data['media_default']->display['default']->display_options['fields']['filename']['link_to_file']);
}
}