Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/ctools_plugin_example/plugins/content_types/relcontext_content_type.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
|
|
4 | 3 |
/** |
5 | 4 |
* @file |
6 | 5 |
* Content type that displays the relcontext context type. |
... | ... | |
27 | 26 |
'category' => array(t('CTools Examples'), -9), |
28 | 27 |
'edit form' => 'relcontext_edit_form', |
29 | 28 |
|
30 |
// this example does not provide 'admin info', which would populate the
|
|
29 |
// This example does not provide 'admin info', which would populate the
|
|
31 | 30 |
// panels builder page preview. |
32 |
|
|
33 | 31 |
); |
34 | 32 |
|
35 | 33 |
/** |
... | ... | |
60 | 58 |
In our case, the configuration form (\$conf) has just one field, 'config_item_1; |
61 | 59 |
and it's configured with: |
62 | 60 |
"); |
63 |
if (!empty($conf)) {
|
|
61 |
if (!empty($conf)) { |
|
64 | 62 |
$block->content .= '<div style="border: 1px solid red;">' . var_export($conf['config_item_1'], TRUE) . '</div>'; |
65 | 63 |
} |
66 | 64 |
if (!empty($context)) { |
... | ... | |
77 | 75 |
/** |
78 | 76 |
* 'Edit' callback for the content type. |
79 | 77 |
* This example just returns a form. |
80 |
* |
|
81 | 78 |
*/ |
82 | 79 |
function relcontext_edit_form($form, &$form_state) { |
83 | 80 |
$conf = $form_state['conf']; |
Formats disponibles : Unified diff
Weekly update of contrib modules