You are here

function flag_plugin_argument_validate_flaggability::tests_info in Flag 6.2

Same name and namespace in other branches
  1. 6 includes/flag_plugin_argument_validate_flaggability.inc \flag_plugin_argument_validate_flaggability::tests_info()
  2. 7.3 includes/views/flag_plugin_argument_validate_flaggability.inc \flag_plugin_argument_validate_flaggability::tests_info()
  3. 7.2 includes/flag_plugin_argument_validate_flaggability.inc \flag_plugin_argument_validate_flaggability::tests_info()

Declares all tests. This scheme makes it easy for derived classes to add and remove tests.

2 calls to flag_plugin_argument_validate_flaggability::tests_info()
flag_plugin_argument_validate_flaggability::tests_options in includes/flag_plugin_argument_validate_flaggability.inc
flag_plugin_argument_validate_flaggability::validate_argument in includes/flag_plugin_argument_validate_flaggability.inc
Tests whether the argument is flaggable, or flagged, or flagged by current user. These are three possible tests, and which of the three to actually carry out is determined by 'flag_test'.

File

includes/flag_plugin_argument_validate_flaggability.inc, line 169
Contains the flaggability validator handler.

Class

flag_plugin_argument_validate_flaggability
Validates whether an argument is a flaggable/flagged object.

Code

function tests_info($which = NULL) {
  return array(
    'flaggable' => array(
      'title' => t('It is flaggable'),
      'callback' => 'test_flaggable',
    ),
    'flagged' => array(
      'title' => t('It is flagged at least once'),
      'callback' => 'test_flagged',
    ),
    'flagged_by_current_user' => array(
      'title' => t('It is flagged by the current user'),
      'callback' => 'test_flagged_by_current_user',
    ),
  );
}