function views_content_views_select_display in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 views_content/plugins/content_types/views.inc \views_content_views_select_display()
Returns an edit form for a block.
File
- views_content/
plugins/ content_types/ views.inc, line 232
Code
function views_content_views_select_display(&$form, &$form_state) {
$view = views_get_view($form_state['subtype_name']);
if (empty($view)) {
return;
}
$displays = array();
foreach ($view->display as $id => $display) {
// Content pane views should never be used this way.
if ($display->display_plugin != 'panel_pane') {
$displays[$id] = $display->display_title;
}
}
$form['display'] = array(
'#type' => 'select',
'#title' => t('Display'),
'#options' => $displays,
'#description' => t('Choose which display of this view you wish to use.'),
);
}