Drupalcon notes: the Chaos tool suite

Collection of tools. Intended to be zero-dependency. One step above core, in Earl's view.

  • Plugins - variation of the hok system. Extensions of modules. Several implementation methods, implementation of other modules and themes
  • Exportables - Allows you to build something from the UI, export it, and run it from code. Everything happens in hook_schema(). Allows for exportable objects, exported objects run from code. CTools handles the overrides. Lets you set variables from your modules.
  • AJAX Responder - It's a command passing framework. Lets you invoke js from server-side. PHP can send an array of javascript commands to the browser.  Take this selector, add an attribute, change the CSS, go.
  • Form Tools - use ctools_build_form as a replacement for drupal_get_form. Drupal's version expects an array. Uses form_state exclusively.
  • Object caching - mainly used for editig or creating complex objects. Allows for 'unsaved' states. Conde responsible for the object is responsible for clearing the cache. Otherwise you'd have just saved / canceled. It only saves the finished object to the DB when you click 'save.'
  • Contexts - packages objects into reusable context. Generally used with URL args, similar to menu loader wildcards. They can be fetched from any condition (url). They can be added manually (page manager)
  • Modal Dialog - used internally by Panels to present all modals. Built atop AJAX Responder. Works very well with forms. Handles form validation and submission workflows. You can control title and content. Very good for doing modal windows that have forms in their content, because it automates a lot of the workflow.
  • Dependent Fields - provides a simple mechanism for 'dependent' form fields. Make a field dependent on another field, usualy a checkbox, radio button, or select.
  • Content - reusable content displays with configurable options. They make use of contexts. Panels panes are content plugins. Almost like an intelligent block system.
  • Form wizard - multi-step forms done differently from core's multistep. Separate forms, vs a single form. Very easy to add new forms (steps) or reorder them.
  • CSS Tools - disassemble, reassemble, compress CSS. Filter by properties or values. (Pull a full CSS file, extract only the font-face properties)
  • Drop-down links - dropdown menu links. Javascript-based. The 'cogs' you see in Panels and Views.

For more info:

CTools powers

  • Panels
  • FeedAPI Extensible Parser (Plugins)
  • Dialog API (AJAX responder, form tools)
  • Strongarm (Exportables)
  • Context
all tags: