You are here

function drupagram_actions_rules_condition_info in Drupagram 7

Implements hook_rules_condition_info().

File

drupagram_actions/drupagram_actions.rules.inc, line 55
Provide better intergration into the rules module

Code

function drupagram_actions_rules_condition_info() {
  $defaults = array(
    'group' => t('drupagram'),
    'parameter' => array(
      'user' => array(
        'type' => 'user',
        'label' => t('User'),
        'description' => t('The user to be checked for.'),
      ),
    ),
    'named parameter' => TRUE,
    'access callback' => 'rules_drupagram_actions_access_callback',
  );
  $items['rules_core_drupagram_conditions_user_has_linked'] = $defaults + array(
    'label' => t('User has linked drupagram account'),
    'help' => t('Evaluates to TRUE in case there is a record in the drupagram_account for the provided user.'),
    'base' => 'drupagram_actions_has_linked',
  );
  $items['rules_core_drupagram_conditions_text_is_under_140'] = array(
    'group' => t('drupagram'),
    'named parameter' => TRUE,
    'parameter' => array(
      'text' => array(
        'type' => 'text',
        'label' => t('Text to check'),
      ),
    ),
    'label' => t('Text is under 140 characters'),
    'help' => t('Returns TRUE if the length of the text is 140 or less.'),
    'base' => 'drupagram_actions_less_140',
  );
  return $items;
}