Projet

Général

Profil

Paste
Télécharger (2,82 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / ctools / UPGRADE.txt @ a5572547

1
Upgrading from ctools-6.x-1.x to ctools-7.x-2.x:
2

    
3
  - Remove ctools_ajax_associate_url_to_element as it shouldn't be necessary
4
    with the new AJAX api's in Drupal core.
5

    
6
  - All calls to the ctools_ajax_command_prepend() should be replace with 
7
    the core function ajax_command_prepend();
8
    This is also the case for append, insert, after, before, replace, html, 
9
    and remove commands. 
10
    Each of these commands have been incorporated into the 
11
    Drupal.ajax.prototype.commands.insert   
12
    function with a corresponding parameter specifying which method to use.
13

    
14
  - All calls to ctools_ajax_render() should be replaced with calls to core
15
    ajax_render(). Note that ctools_ajax_render() printed the json object and
16
    exited, ajax_render() gives you this responsibility. 
17

    
18
    ctools_ajax_render() 
19

    
20
    becomes
21

    
22
    print ajax_render();
23
    exit;
24

    
25
  - All calls to ctools_static*() should be replaced with corresponding calls
26
    to drupal_static*().
27

    
28
  - All calls to ctools_css_add_css should be replaced with calls to
29
    drupal_add_css(). Note that the arguments to drupal_add_css() have changed.
30

    
31
  - All wizard form builder functions must now return a form array().
32

    
33
  - ctools_build_form is very close to being removed.  In anticipation of this, 
34
    all $form_state['wrapper callback']s must now be 
35
    $form_state['wrapper_callback']. In addition to this $form_state['args'] 
36
    must now be $form_state['build_info']['args'].
37

    
38
    NOTE: Previously checking to see if the return from ctools_build_form()
39
    is empty would be enough to see if the form was submitted. This is no
40
    longer true. Please check for $form_state['executed']. If using a wizard
41
    check for $form_state['complete'].
42

    
43
  - Plugin types now must be explicitly registered via a registration hook,
44
    hook_ctools_plugin_type(); info once provided in magically-named functions
45
    (e.g., ctools_ctools_plugin_content_types() was the old function to
46
    provide plugin type info for ctools' content_type plugins) now must be
47
    provided in that global hook. See http://drupal.org/node/910538 for more
48
    details.
49

    
50
  - Plugins that use 'theme arguments' now use 'theme variables' instead.
51

    
52
  - Context, argument and relationship plugins now use 'add form' and/or
53
    'edit form' rather than 'settings form'. These plugins now support 
54
    form wizards just like content plugins. These forms now all take
55
    $form, &$form_state as arguments, and the configuration for the plugin
56
    can be found in $form_state['conf'].
57

    
58
    For all these forms, the submit handler MUST put appropriate data in
59
    $form_state['conf']. Data will no longer be stored automatically.
60

    
61
    For all of these forms, the separate settings #trees in the form are now
62
    gone, so form ids may be adjusted. Also, these are now all real forms
63
    using CTools form wizard instead of fake subforms as previously.