hook_atr_method_info

Versions
6.1
hook_atr_method_info()

Define review methods.

All properties except '#description' are required.

Return value

An associative array.

Code

atr/atr.api.php, line 16

<?php
function hook_atr_method_info() {
  return array(
    'similarity' => array( // The machine name of the review method.
      '#title' => t('Similarity review'), // The human-readable name of the
      // review method.
      '#description' => t('Compare all strings to eachother and list all that are similar. To reduce the amount of different strings, the ones that are similar may be merged.'),
      '#result_callback' => array( // Callback information that displays review
      // results.
        '#callback' => 'atr_results_similar',
        '#module' => 'atr',
        '#file' => 'includes/atr.results.inc',
      ),
      '#review_callback' => array( // Callback information for triggering the
      // review.
        'zxx' => array( // The code of language these callbacks are for as per ISO
        // 639.
          '#callback' => 'atr_review_similar', // The callback's function name.
          '#module' => 'atr', // The module the callback is in.
          '#file' => 'includes/atr.review.inc', // The file the callback is in.
        ),
      ),
    ),
    'blacklist' => array(
      '#title' => t('Blacklist review'),
      '#description' => t('List all strings that contain blacklisted words.'),
      '#result_callback' => array(
        '#callback' => 'atr_results_blacklist',
        '#module' => 'atr',
        '#file' => 'includes/atr.results.inc',
      ),
      '#review_callback' => array(
        'zxx' => array(
          '#callback' => 'atr_review_blacklist',
          '#module' => 'atr',
          '#file' => 'includes/atr.review.inc',
        ),
      ),
    ),
  );
}
?>