1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Allow a view context to be displayed as whole.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
$plugin = array(
|
9 |
|
|
'title' => t('Entire view'),
|
10 |
|
|
'category' => t('View context'),
|
11 |
|
|
'icon' => 'icon_views_page.png',
|
12 |
|
|
'description' => t('Display the entire view.'),
|
13 |
|
|
'required context' => new ctools_context_required(t('View'), 'view'),
|
14 |
|
|
);
|
15 |
|
|
|
16 |
|
|
/**
|
17 |
|
|
* Render the views view content type.
|
18 |
|
|
*/
|
19 |
|
|
function views_content_views_view_content_type_render($subtype, $conf, $panel_args, $context) {
|
20 |
|
|
if (empty($context) || empty($context->data)) {
|
21 |
|
|
return;
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
// Build the content type block.
|
25 |
c304a780
|
Assos Assos
|
$block = new stdClass();
|
26 |
85ad3d82
|
Assos Assos
|
$block->module = 'views_view';
|
27 |
|
|
$block->delta = $context->argument;
|
28 |
|
|
$block->title = '';
|
29 |
|
|
$block->content = '';
|
30 |
|
|
|
31 |
|
|
$output = views_content_context_get_output($context);
|
32 |
|
|
$output = $output['view']->preview();
|
33 |
|
|
$block->content = $output;
|
34 |
|
|
|
35 |
|
|
return $block;
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
function views_content_views_view_content_type_edit_form($form, &$form_state) {
|
39 |
|
|
// This form does nothing; it exists to let the main form select the view context.
|
40 |
|
|
return $form;
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
function views_content_views_view_content_type_edit_form_submit(&$form, &$form_state) {
|
44 |
|
|
// Kept so we guarantee we have a submit handler.
|
45 |
|
|
}
|
46 |
|
|
|
47 |
|
|
/**
|
48 |
|
|
* Returns the administrative title for a type.
|
49 |
|
|
*/
|
50 |
|
|
function views_content_views_view_content_type_admin_title($subtype, $conf, $context) {
|
51 |
|
|
return t('"@context" entire view', array('@context' => $context->identifier));
|
52 |
|
|
} |