ds_exportables_test.module in Display Suite 7
Same filename and directory in other branches
Bulk export of objects generated by Bulk export module.
File
tests/ds_exportables_test/ds_exportables_test.moduleView source
<?php
/**
* @file
* Bulk export of objects generated by Bulk export module.
*/
/**
* Implements hook_ctools_plugin_api().
*/
function ds_exportables_test_ctools_plugin_api($module, $api) {
if ($module == 'ds' && $api == 'ds' || $module == 'ds_extras' && $api == 'ds_extras') {
return array(
'version' => 1,
);
}
}
/**
* Implements hook_ds_custom_fields_info().
*/
function ds_exportables_test_ds_custom_fields_info() {
$ds_fields = array();
$ds_field = new stdClass();
$ds_field->api_version = 1;
$ds_field->field = 'ds_exportable_field';
$ds_field->label = 'Exportable field';
$ds_field->field_type = 5;
$ds_field->entities = array(
'node' => 'node',
);
$ds_field->properties = array(
'code' => array(
'value' => '<?php print "This is an exportable field"; ?>',
'format' => 'ds_code',
),
'use_token' => 0,
);
$ds_fields['ds_exportable_field'] = $ds_field;
return $ds_fields;
}
/**
* Implements hook_ds_field_settings_info().
*/
function ds_exportables_test_ds_field_settings_info() {
$ds_fieldsettings = array();
$ds_fieldsetting = new stdClass();
$ds_fieldsetting->disabled = FALSE;
/* Edit this to true to make a default dsfieldsetting disabled initially */
$ds_fieldsetting->api_version = 1;
$ds_fieldsetting->id = 'node|article|default';
$ds_fieldsetting->entity_type = 'node';
$ds_fieldsetting->bundle = 'article';
$ds_fieldsetting->view_mode = 'default';
$ds_fieldsetting->settings = array(
'title' => array(
'weight' => '0',
'label' => 'hidden',
'format' => 'default',
'formatter_settings' => array(
'link' => '1',
'wrapper' => 'h3',
'class' => '',
),
),
'node_link' => array(
'weight' => '1',
'label' => 'hidden',
'format' => 'default',
),
);
$ds_fieldsettings['node|article|default'] = $ds_fieldsetting;
return $ds_fieldsettings;
}
/**
* Implements hook_ds_layout_settings_info().
*/
function ds_exportables_test_ds_layout_settings_info() {
$ds_layouts = array();
$ds_layout = new stdClass();
$ds_layout->disabled = FALSE;
/* Edit this to true to make a default dslayout disabled initially */
$ds_layout->api_version = 1;
$ds_layout->id = 'node|article|default';
$ds_layout->entity_type = 'node';
$ds_layout->bundle = 'article';
$ds_layout->view_mode = 'default';
$ds_layout->layout = 'ds_2col';
$ds_layout->settings = array(
'hide_empty_regions' => 0,
'regions' => array(
'left' => array(
0 => 'title',
1 => 'node_link',
),
'right' => array(
0 => 'body',
),
),
'fields' => array(
'title' => 'left',
'node_link' => 'left',
'body' => 'right',
),
'classes' => array(),
);
$ds_layouts['node|article|default'] = $ds_layout;
return $ds_layouts;
}
/**
* Implements hook_ds_view_modes_info().
*/
function ds_exportables_test_ds_view_modes_info() {
$ds_view_modes = array();
$ds_view_mode = new stdClass();
$ds_view_mode->disabled = FALSE;
/* Edit this to true to make a default ds_view_mode disabled initially */
$ds_view_mode->api_version = 1;
$ds_view_mode->view_mode = 'test_exportables';
$ds_view_mode->label = 'Test exportables';
$ds_view_mode->entities = array(
'node' => 'node',
);
$ds_view_modes['test_exportables'] = $ds_view_mode;
return $ds_view_modes;
}
/**
* Implements hook_ds_vd_info().
*/
function ds_exportables_test_ds_vd_info() {
$ds_vds = array();
$ds_vd = new stdClass();
$ds_vd->api_version = 1;
$ds_vd->vd = 'frontpage-page';
$ds_vd->label = 'Frontpage: Views displays';
$ds_vds['frontpage-page'] = $ds_vd;
return $ds_vds;
}
Functions
Name | Description |
---|---|
ds_exportables_test_ctools_plugin_api | Implements hook_ctools_plugin_api(). |
ds_exportables_test_ds_custom_fields_info | Implements hook_ds_custom_fields_info(). |
ds_exportables_test_ds_field_settings_info | Implements hook_ds_field_settings_info(). |
ds_exportables_test_ds_layout_settings_info | Implements hook_ds_layout_settings_info(). |
ds_exportables_test_ds_vd_info | Implements hook_ds_vd_info(). |
ds_exportables_test_ds_view_modes_info | Implements hook_ds_view_modes_info(). |