function ds_extras_vd_manage in Display Suite 7.2
Same name and namespace in other branches
- 7 modules/ds_extras/ds_extras.vd.inc \ds_extras_vd_manage()
Edit the display or remove a views display.
Parameters
$bundle: The name of the bundle
$action: The action to take (edit or remove)
1 string reference to 'ds_extras_vd_manage'
- ds_extras_menu in modules/
ds_extras/ ds_extras.module - Implements hook_menu().
File
- modules/
ds_extras/ includes/ ds_extras.vd.inc, line 135 - Views displays functions.
Code
function ds_extras_vd_manage($bundle = '', $action = '') {
$entity_info = entity_get_info('ds_views');
if (!empty($bundle) && isset($entity_info['bundles'][$bundle]) && $action == 'remove') {
return drupal_get_form('ds_extras_vd_bundle_remove', $bundle, $entity_info['bundles'][$bundle]['label']);
}
if (!empty($bundle) && isset($entity_info['bundles'][$bundle]) && $action == 'display') {
return ds_extras_vd_field_ui($bundle);
}
// Redirect to overview.
drupal_set_message(t('No view found to layout.'));
drupal_goto('admin/structure/ds/vd');
}