Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/ctools_plugin_example/plugins/panels.pages.inc | ||
---|---|---|
19 | 19 |
$page->load_flags = 1; |
20 | 20 |
$page->css_id = ''; |
21 | 21 |
$page->arguments = array( |
22 |
0 => |
|
22 |
0 =>
|
|
23 | 23 |
array( |
24 |
'name' => 'simplecontext_arg',
|
|
25 |
'id' => 1,
|
|
26 |
'default' => '404',
|
|
27 |
'title' => '',
|
|
28 |
'identifier' => 'Simplecontext arg',
|
|
29 |
'keyword' => 'simplecontext',
|
|
24 |
'name' => 'simplecontext_arg', |
|
25 |
'id' => 1, |
|
26 |
'default' => '404', |
|
27 |
'title' => '', |
|
28 |
'identifier' => 'Simplecontext arg', |
|
29 |
'keyword' => 'simplecontext', |
|
30 | 30 |
), |
31 | 31 |
); |
32 | 32 |
$page->relationships = array( |
33 |
0 => |
|
33 |
0 =>
|
|
34 | 34 |
array( |
35 |
'context' => 'argument_simplecontext_arg_1',
|
|
36 |
'name' => 'relcontext_from_simplecontext',
|
|
37 |
'id' => 1,
|
|
38 |
'identifier' => 'Relcontext from Simplecontext',
|
|
39 |
'keyword' => 'relcontext',
|
|
35 |
'context' => 'argument_simplecontext_arg_1', |
|
36 |
'name' => 'relcontext_from_simplecontext', |
|
37 |
'id' => 1, |
|
38 |
'identifier' => 'Relcontext from Simplecontext', |
|
39 |
'keyword' => 'relcontext', |
|
40 | 40 |
), |
41 | 41 |
); |
42 | 42 |
$page->no_blocks = '0'; |
... | ... | |
58 | 58 |
$pane->subtype = 'custom'; |
59 | 59 |
$pane->access = array(); |
60 | 60 |
$pane->configuration = array( |
61 |
'style' => 'default',
|
|
62 |
'override_title' => 0,
|
|
63 |
'override_title_text' => '',
|
|
64 |
'css_id' => '',
|
|
65 |
'css_class' => '',
|
|
66 |
'title' => '"No Context Item"',
|
|
67 |
'body' => 'The "no context item" content type is here to demonstrate that you can create a content_type that does not require a context. This is probably the same as just creating a custom php block on the fly, and might serve the same purpose.',
|
|
68 |
'format' => '1',
|
|
61 |
'style' => 'default', |
|
62 |
'override_title' => 0, |
|
63 |
'override_title_text' => '', |
|
64 |
'css_id' => '', |
|
65 |
'css_class' => '', |
|
66 |
'title' => '"No Context Item"', |
|
67 |
'body' => 'The "no context item" content type is here to demonstrate that you can create a content_type that does not require a context. This is probably the same as just creating a custom php block on the fly, and might serve the same purpose.', |
|
68 |
'format' => '1', |
|
69 | 69 |
); |
70 | 70 |
$pane->cache = array(); |
71 | 71 |
$display->content['new-1'] = $pane; |
... | ... | |
78 | 78 |
$pane->subtype = 'description'; |
79 | 79 |
$pane->access = array(); |
80 | 80 |
$pane->configuration = array( |
81 |
'style' => 'default',
|
|
82 |
'override_title' => 0,
|
|
83 |
'override_title_text' => '',
|
|
84 |
'css_id' => '',
|
|
85 |
'css_class' => '',
|
|
86 |
'item1' => 'one',
|
|
87 |
'item2' => 'two',
|
|
88 |
'item3' => 'three',
|
|
81 |
'style' => 'default', |
|
82 |
'override_title' => 0, |
|
83 |
'override_title_text' => '', |
|
84 |
'css_id' => '', |
|
85 |
'css_class' => '', |
|
86 |
'item1' => 'one', |
|
87 |
'item2' => 'two', |
|
88 |
'item3' => 'three', |
|
89 | 89 |
); |
90 | 90 |
$pane->cache = array(); |
91 | 91 |
$display->content['new-2'] = $pane; |
... | ... | |
98 | 98 |
$pane->subtype = 'custom'; |
99 | 99 |
$pane->access = array(); |
100 | 100 |
$pane->configuration = array( |
101 |
'style' => 'default',
|
|
102 |
'override_title' => 0,
|
|
103 |
'override_title_text' => '',
|
|
104 |
'css_id' => '',
|
|
105 |
'css_class' => '',
|
|
106 |
'title' => 'Simplecontext',
|
|
107 |
'body' => 'The "Simplecontext" content and content type demonstrate a very basic context and how to display it.
|
|
101 |
'style' => 'default', |
|
102 |
'override_title' => 0, |
|
103 |
'override_title_text' => '', |
|
104 |
'css_id' => '', |
|
105 |
'css_class' => '', |
|
106 |
'title' => 'Simplecontext', |
|
107 |
'body' => 'The "Simplecontext" content and content type demonstrate a very basic context and how to display it. |
|
108 | 108 |
|
109 | 109 |
Simplecontext includes configuration, so it can get info from the config. It can also get its information to run from a simplecontext context, generated either from an arg to the panels page or via explicitly adding a context to the page.', |
110 |
'format' => '1',
|
|
110 |
'format' => '1', |
|
111 | 111 |
); |
112 | 112 |
$pane->cache = array(); |
113 | 113 |
$display->content['new-3'] = $pane; |
... | ... | |
119 | 119 |
$pane->shown = '1'; |
120 | 120 |
$pane->subtype = 'description'; |
121 | 121 |
$pane->access = array( |
122 |
0 => '2', |
|
123 |
1 => '4', |
|
122 |
0 => '2',
|
|
123 |
1 => '4',
|
|
124 | 124 |
); |
125 | 125 |
$pane->configuration = array( |
126 |
'context' => 'argument_simplecontext_arg_1',
|
|
127 |
'style' => 'default',
|
|
128 |
'override_title' => 0,
|
|
129 |
'override_title_text' => '',
|
|
130 |
'css_id' => '',
|
|
131 |
'css_class' => '',
|
|
132 |
'config_item_1' => 'simplecontext called from arg',
|
|
126 |
'context' => 'argument_simplecontext_arg_1', |
|
127 |
'style' => 'default', |
|
128 |
'override_title' => 0, |
|
129 |
'override_title_text' => '', |
|
130 |
'css_id' => '', |
|
131 |
'css_class' => '', |
|
132 |
'config_item_1' => 'simplecontext called from arg', |
|
133 | 133 |
); |
134 | 134 |
$pane->cache = array(); |
135 | 135 |
$display->content['new-4'] = $pane; |
... | ... | |
142 | 142 |
$pane->subtype = 'custom'; |
143 | 143 |
$pane->access = array(); |
144 | 144 |
$pane->configuration = array( |
145 |
'style' => 'default',
|
|
146 |
'override_title' => 0,
|
|
147 |
'override_title_text' => '',
|
|
148 |
'css_id' => '',
|
|
149 |
'css_class' => '',
|
|
150 |
'title' => 'Relcontext',
|
|
151 |
'body' => 'The relcontext content_type gets its data from a relcontext, which is an example of a relationship. This panel should be run with an argument like "/xxx", which allows the simplecontext to get its context, and then the relcontext is configured in this panel to get (create) its data from the simplecontext.',
|
|
152 |
'format' => '1',
|
|
145 |
'style' => 'default', |
|
146 |
'override_title' => 0, |
|
147 |
'override_title_text' => '', |
|
148 |
'css_id' => '', |
|
149 |
'css_class' => '', |
|
150 |
'title' => 'Relcontext', |
|
151 |
'body' => 'The relcontext content_type gets its data from a relcontext, which is an example of a relationship. This panel should be run with an argument like "/xxx", which allows the simplecontext to get its context, and then the relcontext is configured in this panel to get (create) its data from the simplecontext.', |
|
152 |
'format' => '1', |
|
153 | 153 |
); |
154 | 154 |
$pane->cache = array(); |
155 | 155 |
$display->content['new-5'] = $pane; |
... | ... | |
162 | 162 |
$pane->subtype = 'description'; |
163 | 163 |
$pane->access = array(); |
164 | 164 |
$pane->configuration = array( |
165 |
'context' => 'relationship_relcontext_from_simplecontext_1',
|
|
166 |
'style' => 'default',
|
|
167 |
'override_title' => 0,
|
|
168 |
'override_title_text' => '',
|
|
169 |
'css_id' => '',
|
|
170 |
'css_class' => '',
|
|
171 |
'config_item_1' => 'default1',
|
|
165 |
'context' => 'relationship_relcontext_from_simplecontext_1', |
|
166 |
'style' => 'default', |
|
167 |
'override_title' => 0, |
|
168 |
'override_title_text' => '', |
|
169 |
'css_id' => '', |
|
170 |
'css_class' => '', |
|
171 |
'config_item_1' => 'default1', |
|
172 | 172 |
); |
173 | 173 |
$pane->cache = array(); |
174 | 174 |
$display->content['new-6'] = $pane; |
... | ... | |
181 | 181 |
$pane->subtype = 'custom_php'; |
182 | 182 |
$pane->access = array(); |
183 | 183 |
$pane->configuration = array( |
184 |
'style' => 'default',
|
|
185 |
'override_title' => 0,
|
|
186 |
'override_title_text' => '',
|
|
187 |
'css_id' => '',
|
|
188 |
'css_class' => '',
|
|
189 |
'title' => '',
|
|
190 |
'body' => '$arg = arg(1);
|
|
184 |
'style' => 'default', |
|
185 |
'override_title' => 0, |
|
186 |
'override_title_text' => '', |
|
187 |
'css_id' => '', |
|
188 |
'css_class' => '', |
|
189 |
'title' => '', |
|
190 |
'body' => '$arg = arg(1); |
|
191 | 191 |
$arg0 = arg(0); |
192 | 192 |
if (!$arg) { |
193 | 193 |
$block->content = <<<END |
... | ... | |
209 | 209 |
$page->displays = array(); |
210 | 210 |
$pages['ctools_plugin_example'] = $page; |
211 | 211 |
|
212 |
|
|
213 | 212 |
return $pages; |
214 | 213 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules