You are here

function blockreference_elements in Block reference 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 blockreference and userreference).

File

./blockreference.module, line 392
Defines a field type for referencing a block from a node.

Code

function blockreference_elements() {
  return array(
    'blockreference_select' => array(
      '#input' => TRUE,
      '#columns' => array(
        'uid',
      ),
      '#delta' => 0,
      '#process' => array(
        'blockreference_select_process',
      ),
    ),
    'blockreference_select_sort' => array(
      '#input' => TRUE,
      '#columns' => array(
        'uid',
      ),
      '#delta' => 0,
      '#process' => array(
        'blockreference_select_sort_process',
      ),
    ),
    'blockreference_autocomplete' => array(
      '#input' => TRUE,
      '#columns' => array(
        'name',
      ),
      '#delta' => 0,
      '#process' => array(
        'blockreference_autocomplete_process',
      ),
      '#autocomplete_path' => FALSE,
    ),
  );
}