1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Bulk export of objects generated by Bulk export module.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_ctools_plugin_api().
|
10
|
*/
|
11
|
function ds_exportables_test_ctools_plugin_api($module, $api) {
|
12
|
if (($module == 'ds' && $api == 'ds') || ($module == 'ds_extras' && $api == 'ds_extras')) {
|
13
|
return array('version' => 1);
|
14
|
}
|
15
|
}
|
16
|
|
17
|
/**
|
18
|
* Implements hook_ds_custom_fields_info().
|
19
|
*/
|
20
|
function ds_exportables_test_ds_custom_fields_info() {
|
21
|
$ds_fields = array();
|
22
|
|
23
|
$ds_field = new stdClass;
|
24
|
$ds_field->api_version = 1;
|
25
|
$ds_field->field = 'ds_exportable_field';
|
26
|
$ds_field->label = 'Exportable field';
|
27
|
$ds_field->field_type = 5;
|
28
|
$ds_field->entities = array(
|
29
|
'node' => 'node',
|
30
|
);
|
31
|
$ds_field->properties = array(
|
32
|
'code' => array(
|
33
|
'value' => '<?php print "This is an exportable field"; ?>',
|
34
|
'format' => 'ds_code',
|
35
|
),
|
36
|
'use_token' => 0,
|
37
|
);
|
38
|
$ds_fields['ds_exportable_field'] = $ds_field;
|
39
|
|
40
|
return $ds_fields;
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
* Implements hook_ds_field_settings_info().
|
45
|
*/
|
46
|
function ds_exportables_test_ds_field_settings_info() {
|
47
|
$ds_fieldsettings = array();
|
48
|
|
49
|
$ds_fieldsetting = new stdClass;
|
50
|
$ds_fieldsetting->disabled = FALSE; /* Edit this to true to make a default dsfieldsetting disabled initially */
|
51
|
$ds_fieldsetting->api_version = 1;
|
52
|
$ds_fieldsetting->id = 'node|article|default';
|
53
|
$ds_fieldsetting->entity_type = 'node';
|
54
|
$ds_fieldsetting->bundle = 'article';
|
55
|
$ds_fieldsetting->view_mode = 'default';
|
56
|
$ds_fieldsetting->settings = array(
|
57
|
'title' => array(
|
58
|
'weight' => '0',
|
59
|
'label' => 'hidden',
|
60
|
'format' => 'default',
|
61
|
'formatter_settings' => array(
|
62
|
'link' => '1',
|
63
|
'wrapper' => 'h3',
|
64
|
'class' => '',
|
65
|
),
|
66
|
),
|
67
|
'node_link' => array(
|
68
|
'weight' => '1',
|
69
|
'label' => 'hidden',
|
70
|
'format' => 'default',
|
71
|
),
|
72
|
);
|
73
|
$ds_fieldsettings['node|article|default'] = $ds_fieldsetting;
|
74
|
|
75
|
return $ds_fieldsettings;
|
76
|
}
|
77
|
|
78
|
/**
|
79
|
* Implements hook_ds_layout_settings_info().
|
80
|
*/
|
81
|
function ds_exportables_test_ds_layout_settings_info() {
|
82
|
$ds_layouts = array();
|
83
|
|
84
|
$ds_layout = new stdClass;
|
85
|
$ds_layout->disabled = FALSE; /* Edit this to true to make a default dslayout disabled initially */
|
86
|
$ds_layout->api_version = 1;
|
87
|
$ds_layout->id = 'node|article|default';
|
88
|
$ds_layout->entity_type = 'node';
|
89
|
$ds_layout->bundle = 'article';
|
90
|
$ds_layout->view_mode = 'default';
|
91
|
$ds_layout->layout = 'ds_2col';
|
92
|
$ds_layout->settings = array(
|
93
|
'regions' => array(
|
94
|
'left' => array(
|
95
|
0 => 'title',
|
96
|
1 => 'node_link',
|
97
|
),
|
98
|
'right' => array(
|
99
|
0 => 'body',
|
100
|
),
|
101
|
),
|
102
|
'fields' => array(
|
103
|
'title' => 'left',
|
104
|
'node_link' => 'left',
|
105
|
'body' => 'right',
|
106
|
),
|
107
|
'classes' => array(),
|
108
|
);
|
109
|
$ds_layouts['node|article|default'] = $ds_layout;
|
110
|
|
111
|
return $ds_layouts;
|
112
|
}
|
113
|
|
114
|
/**
|
115
|
* Implements hook_ds_view_modes_info().
|
116
|
*/
|
117
|
function ds_exportables_test_ds_view_modes_info() {
|
118
|
$ds_view_modes = array();
|
119
|
|
120
|
$ds_view_mode = new stdClass;
|
121
|
$ds_view_mode->disabled = FALSE; /* Edit this to true to make a default ds_view_mode disabled initially */
|
122
|
$ds_view_mode->api_version = 1;
|
123
|
$ds_view_mode->view_mode = 'test_exportables';
|
124
|
$ds_view_mode->label = 'Test exportables';
|
125
|
$ds_view_mode->entities = array(
|
126
|
'node' => 'node',
|
127
|
);
|
128
|
$ds_view_modes['test_exportables'] = $ds_view_mode;
|
129
|
|
130
|
return $ds_view_modes;
|
131
|
}
|
132
|
|
133
|
/**
|
134
|
* Implements hook_ds_vd_info().
|
135
|
*/
|
136
|
function ds_exportables_test_ds_vd_info() {
|
137
|
$ds_vds = array();
|
138
|
|
139
|
$ds_vd = new stdClass;
|
140
|
$ds_vd->api_version = 1;
|
141
|
$ds_vd->vd = 'frontpage-page';
|
142
|
$ds_vd->label = 'Frontpage: Views displays';
|
143
|
$ds_vds['frontpage-page'] = $ds_vd;
|
144
|
|
145
|
return $ds_vds;
|
146
|
}
|