You are here

function petreference_elements in Previewable email templates 6

Implementation of FAPI hook_elements().

Any FAPI callbacks needed for individual widgets can be declared here, and the element will be passed to those callbacks for processing.

Drupal will automatically theme the element using a theme with the same name as the hook_elements key.

Autocomplete_path is not used by text_widget but other widgets can use it (see nodereference and userreference).

File

modules/petreference/petreference.module, line 376
Defines a field type for referencing pet template to a node.

Code

function petreference_elements() {
  return array(
    'petreference_select' => array(
      '#input' => TRUE,
      '#columns' => array(
        'uid',
      ),
      '#delta' => 0,
      '#process' => array(
        'petreference_select_process',
      ),
    ),
    'petreference_buttons' => array(
      '#input' => TRUE,
      '#columns' => array(
        'uid',
      ),
      '#delta' => 0,
      '#process' => array(
        'petreference_buttons_process',
      ),
    ),
    'petreference_autocomplete' => array(
      '#input' => TRUE,
      '#columns' => array(
        'name',
      ),
      '#delta' => 0,
      '#process' => array(
        'petreference_autocomplete_process',
      ),
      '#autocomplete_path' => FALSE,
    ),
  );
}