Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.pages_default.inc | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Default panels pages for CTools Plugin Example |
|
9 |
* Default panels pages for CTools Plugin Example.
|
|
10 | 10 |
* |
11 | 11 |
* To pick up this file, your module needs to implement |
12 | 12 |
* hook_ctools_plugin_api() - See ctools_plugin_example_ctools_plugin_api() in |
... | ... | |
23 | 23 |
* @return |
24 | 24 |
* Array of pages, normally exported from Panels. |
25 | 25 |
*/ |
26 |
|
|
27 | 26 |
function ctools_plugin_example_default_page_manager_pages() { |
28 | 27 |
|
29 |
// begin exported panel. |
|
30 |
|
|
31 |
$page = new stdClass; |
|
28 |
// Begin exported panel. |
|
29 |
$page = new stdClass(); |
|
32 | 30 |
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
33 | 31 |
$page->api_version = 1; |
34 | 32 |
$page->name = 'ctools_plugin_example'; |
... | ... | |
37 | 35 |
$page->admin_description = 'This panel provides no functionality to a working Drupal system. It\'s intended to display the various sample plugins provided by the CTools Plugin Example module. '; |
38 | 36 |
$page->path = 'ctools_plugin_example/%sc'; |
39 | 37 |
$page->access = array( |
40 |
'logic' => 'and', |
|
38 |
'logic' => 'and',
|
|
41 | 39 |
); |
42 | 40 |
$page->menu = array( |
43 |
'type' => 'normal', |
|
44 |
'title' => 'CTools plugin example', |
|
45 |
'name' => 'navigation', |
|
46 |
'weight' => '0', |
|
47 |
'parent' => array( |
|
48 |
'type' => 'none', |
|
49 |
'title' => '', |
|
41 |
'type' => 'normal', |
|
42 |
'title' => 'CTools plugin example', |
|
50 | 43 |
'name' => 'navigation', |
51 | 44 |
'weight' => '0', |
52 |
), |
|
45 |
'parent' => array( |
|
46 |
'type' => 'none', |
|
47 |
'title' => '', |
|
48 |
'name' => 'navigation', |
|
49 |
'weight' => '0', |
|
50 |
), |
|
53 | 51 |
); |
54 | 52 |
$page->arguments = array( |
55 |
'sc' => array( |
|
56 |
'id' => 2, |
|
57 |
'identifier' => 'simplecontext-arg', |
|
58 |
'name' => 'simplecontext_arg', |
|
59 |
'settings' => array(), |
|
60 |
), |
|
53 |
'sc' => array(
|
|
54 |
'id' => 2,
|
|
55 |
'identifier' => 'simplecontext-arg',
|
|
56 |
'name' => 'simplecontext_arg',
|
|
57 |
'settings' => array(),
|
|
58 |
),
|
|
61 | 59 |
); |
62 | 60 |
$page->conf = array(); |
63 | 61 |
$page->default_handlers = array(); |
64 |
$handler = new stdClass; |
|
62 |
$handler = new stdClass();
|
|
65 | 63 |
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
66 | 64 |
$handler->api_version = 1; |
67 | 65 |
$handler->name = 'page_ctools_panel_context'; |
... | ... | |
70 | 68 |
$handler->handler = 'panel_context'; |
71 | 69 |
$handler->weight = 0; |
72 | 70 |
$handler->conf = array( |
73 |
'title' => 'Panel', |
|
74 |
'no_blocks' => FALSE, |
|
75 |
'css_id' => '', |
|
76 |
'css' => '', |
|
77 |
'contexts' => array( |
|
78 |
'0' => array( |
|
79 |
'name' => 'simplecontext', |
|
80 |
'id' => 1, |
|
81 |
'identifier' => 'Configured simplecontext (not from argument)', |
|
82 |
'keyword' => 'configured_simplecontext', |
|
83 |
'context_settings' => array( |
|
84 |
'sample_simplecontext_setting' => 'default simplecontext setting', |
|
85 |
), |
|
86 |
), |
|
87 |
), |
|
88 |
'relationships' => array( |
|
89 |
'0' => array( |
|
90 |
'context' => 'argument_simplecontext_arg_2', |
|
91 |
'name' => 'relcontext_from_simplecontext', |
|
92 |
'id' => 1, |
|
93 |
'identifier' => 'Relcontext from simplecontext (from relationship)', |
|
94 |
'keyword' => 'relcontext', |
|
95 |
), |
|
96 |
), |
|
97 |
'access' => array( |
|
98 |
'logic' => 'and', |
|
99 |
), |
|
71 |
'title' => 'Panel',
|
|
72 |
'no_blocks' => FALSE,
|
|
73 |
'css_id' => '',
|
|
74 |
'css' => '',
|
|
75 |
'contexts' => array(
|
|
76 |
'0' => array(
|
|
77 |
'name' => 'simplecontext',
|
|
78 |
'id' => 1,
|
|
79 |
'identifier' => 'Configured simplecontext (not from argument)',
|
|
80 |
'keyword' => 'configured_simplecontext',
|
|
81 |
'context_settings' => array(
|
|
82 |
'sample_simplecontext_setting' => 'default simplecontext setting',
|
|
83 |
),
|
|
84 |
),
|
|
85 |
),
|
|
86 |
'relationships' => array(
|
|
87 |
'0' => array(
|
|
88 |
'context' => 'argument_simplecontext_arg_2',
|
|
89 |
'name' => 'relcontext_from_simplecontext',
|
|
90 |
'id' => 1,
|
|
91 |
'identifier' => 'Relcontext from simplecontext (from relationship)',
|
|
92 |
'keyword' => 'relcontext',
|
|
93 |
),
|
|
94 |
),
|
|
95 |
'access' => array(
|
|
96 |
'logic' => 'and',
|
|
97 |
),
|
|
100 | 98 |
); |
101 |
$display = new panels_display; |
|
99 |
$display = new panels_display();
|
|
102 | 100 |
$display->layout = 'threecol_33_34_33_stacked'; |
103 | 101 |
$display->layout_settings = array(); |
104 | 102 |
$display->panel_settings = array( |
105 |
'style' => 'rounded_corners', |
|
106 |
'style_settings' => array( |
|
107 |
'default' => array( |
|
108 |
'corner_location' => 'pane', |
|
109 |
), |
|
110 |
), |
|
103 |
'style' => 'rounded_corners',
|
|
104 |
'style_settings' => array(
|
|
105 |
'default' => array(
|
|
106 |
'corner_location' => 'pane',
|
|
107 |
),
|
|
108 |
),
|
|
111 | 109 |
); |
112 | 110 |
$display->cache = array(); |
113 | 111 |
$display->title = 'CTools plugin example panel'; |
... | ... | |
115 | 113 |
$display->title_pane = 1; |
116 | 114 |
$display->content = array(); |
117 | 115 |
$display->panels = array(); |
118 |
$pane = new stdClass; |
|
116 |
$pane = new stdClass();
|
|
119 | 117 |
$pane->pid = 'new-1'; |
120 | 118 |
$pane->panel = 'left'; |
121 | 119 |
$pane->type = 'no_context_content_type'; |
... | ... | |
135 | 133 |
$pane->position = 0; |
136 | 134 |
$display->content['new-1'] = $pane; |
137 | 135 |
$display->panels['left'][0] = 'new-1'; |
138 |
$pane = new stdClass; |
|
136 |
$pane = new stdClass();
|
|
139 | 137 |
$pane->pid = 'new-2'; |
140 | 138 |
$pane->panel = 'left'; |
141 | 139 |
$pane->type = 'custom'; |
... | ... | |
148 | 146 |
'settings' => array( |
149 | 147 |
'greater_than' => '1', |
150 | 148 |
'arg_length' => '4', |
151 |
), |
|
149 |
),
|
|
152 | 150 |
'context' => 'argument_simplecontext_arg_2', |
153 |
), |
|
154 |
), |
|
151 |
),
|
|
152 |
),
|
|
155 | 153 |
); |
156 | 154 |
$pane->configuration = array( |
157 | 155 |
'title' => 'Long Arg Visibility Block', |
... | ... | |
166 | 164 |
$pane->position = 1; |
167 | 165 |
$display->content['new-2'] = $pane; |
168 | 166 |
$display->panels['left'][1] = 'new-2'; |
169 |
$pane = new stdClass; |
|
167 |
$pane = new stdClass();
|
|
170 | 168 |
$pane->pid = 'new-3'; |
171 | 169 |
$pane->panel = 'left'; |
172 | 170 |
$pane->type = 'custom'; |
... | ... | |
179 | 177 |
'settings' => array( |
180 | 178 |
'greater_than' => '0', |
181 | 179 |
'arg_length' => '4', |
182 |
), |
|
180 |
),
|
|
183 | 181 |
'context' => 'argument_simplecontext_arg_2', |
184 |
), |
|
185 |
), |
|
182 |
),
|
|
183 |
),
|
|
186 | 184 |
); |
187 | 185 |
$pane->configuration = array( |
188 | 186 |
'title' => 'Short Arg Visibility', |
... | ... | |
197 | 195 |
$pane->position = 2; |
198 | 196 |
$display->content['new-3'] = $pane; |
199 | 197 |
$display->panels['left'][2] = 'new-3'; |
200 |
$pane = new stdClass; |
|
198 |
$pane = new stdClass();
|
|
201 | 199 |
$pane->pid = 'new-4'; |
202 | 200 |
$pane->panel = 'middle'; |
203 | 201 |
$pane->type = 'simplecontext_content_type'; |
... | ... | |
241 | 239 |
$pane->position = 0; |
242 | 240 |
$display->content['new-4'] = $pane; |
243 | 241 |
$display->panels['middle'][0] = 'new-4'; |
244 |
$pane = new stdClass; |
|
242 |
$pane = new stdClass();
|
|
245 | 243 |
$pane->pid = 'new-5'; |
246 | 244 |
$pane->panel = 'middle'; |
247 | 245 |
$pane->type = 'simplecontext_content_type'; |
... | ... | |
285 | 283 |
$pane->position = 1; |
286 | 284 |
$display->content['new-5'] = $pane; |
287 | 285 |
$display->panels['middle'][1] = 'new-5'; |
288 |
$pane = new stdClass; |
|
286 |
$pane = new stdClass();
|
|
289 | 287 |
$pane->pid = 'new-6'; |
290 | 288 |
$pane->panel = 'middle'; |
291 | 289 |
$pane->type = 'custom'; |
... | ... | |
309 | 307 |
$pane->position = 2; |
310 | 308 |
$display->content['new-6'] = $pane; |
311 | 309 |
$display->panels['middle'][2] = 'new-6'; |
312 |
$pane = new stdClass; |
|
310 |
$pane = new stdClass();
|
|
313 | 311 |
$pane->pid = 'new-7'; |
314 | 312 |
$pane->panel = 'right'; |
315 | 313 |
$pane->type = 'relcontext_content_type'; |
... | ... | |
353 | 351 |
$pane->position = 0; |
354 | 352 |
$display->content['new-7'] = $pane; |
355 | 353 |
$display->panels['right'][0] = 'new-7'; |
356 |
$pane = new stdClass; |
|
354 |
$pane = new stdClass();
|
|
357 | 355 |
$pane->pid = 'new-8'; |
358 | 356 |
$pane->panel = 'top'; |
359 | 357 |
$pane->type = 'custom'; |
... | ... | |
378 | 376 |
$handler->conf['display'] = $display; |
379 | 377 |
$page->default_handlers[$handler->name] = $handler; |
380 | 378 |
|
381 |
// end of exported panel.
|
|
379 |
// End of exported panel.
|
|
382 | 380 |
$pages['ctools_plugin_example_demo_page'] = $page; |
383 | 381 |
|
384 |
// begin exported panel |
|
385 |
|
|
386 |
$page = new stdClass; |
|
382 |
// Begin exported panel. |
|
383 |
$page = new stdClass(); |
|
387 | 384 |
$page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */ |
388 | 385 |
$page->api_version = 1; |
389 | 386 |
$page->name = 'ctools_plugin_example_base'; |
... | ... | |
396 | 393 |
$page->arguments = array(); |
397 | 394 |
$page->conf = array(); |
398 | 395 |
$page->default_handlers = array(); |
399 |
$handler = new stdClass; |
|
396 |
$handler = new stdClass();
|
|
400 | 397 |
$handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ |
401 | 398 |
$handler->api_version = 1; |
402 | 399 |
$handler->name = 'page_ctools_plugin_example_base_panel_context'; |
... | ... | |
405 | 402 |
$handler->handler = 'panel_context'; |
406 | 403 |
$handler->weight = 0; |
407 | 404 |
$handler->conf = array( |
408 |
'title' => 'Panel', |
|
409 |
'no_blocks' => FALSE, |
|
410 |
'css_id' => '', |
|
411 |
'css' => '', |
|
412 |
'contexts' => array(), |
|
413 |
'relationships' => array(), |
|
405 |
'title' => 'Panel',
|
|
406 |
'no_blocks' => FALSE,
|
|
407 |
'css_id' => '',
|
|
408 |
'css' => '',
|
|
409 |
'contexts' => array(),
|
|
410 |
'relationships' => array(),
|
|
414 | 411 |
); |
415 |
$display = new panels_display; |
|
412 |
$display = new panels_display();
|
|
416 | 413 |
$display->layout = 'onecol'; |
417 | 414 |
$display->layout_settings = array(); |
418 | 415 |
$display->panel_settings = array(); |
... | ... | |
421 | 418 |
$display->hide_title = FALSE; |
422 | 419 |
$display->content = array(); |
423 | 420 |
$display->panels = array(); |
424 |
$pane = new stdClass; |
|
421 |
$pane = new stdClass();
|
|
425 | 422 |
$pane->pid = 'new-1'; |
426 | 423 |
$pane->panel = 'middle'; |
427 | 424 |
$pane->type = 'custom'; |
... | ... | |
443 | 440 |
$display->panels['middle'][0] = 'new-1'; |
444 | 441 |
$handler->conf['display'] = $display; |
445 | 442 |
$page->default_handlers[$handler->name] = $handler; |
446 |
// end exported panel. |
|
447 |
|
|
443 |
// End exported panel. |
|
448 | 444 |
$pages['base_page'] = $page; |
449 | 445 |
|
450 | 446 |
return $pages; |
451 |
} |
|
447 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules