You are here

function lingotek_rules_condition_info in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.rules.inc \lingotek_rules_condition_info()
  2. 7.6 lingotek.rules.inc \lingotek_rules_condition_info()

Implements hook_rules_condition_info().

File

./lingotek.rules.inc, line 113
Lingotek Module + Rules Module Integration

Code

function lingotek_rules_condition_info() {
  $items = array();
  $items['lingotek_rules_entity_all_downloaded'] = array(
    'group' => t('Lingotek'),
    'module' => 'lingotek',
    'label' => t('Entity has all translations downloaded'),
    'parameter' => array(
      'entity' => array(
        'type' => 'entity',
        'label' => t('Entity'),
        'desciption' => t('Specifies the entity for which the translation was downloaded.'),
      ),
    ),
  );
  $items['lingotek_rules_entity_all_ready_for_download'] = array(
    'group' => t('Lingotek'),
    'module' => 'lingotek',
    'label' => t('Entity has all translations ready for download'),
    'parameter' => array(
      'entity' => array(
        'type' => 'entity',
        'label' => t('Entity'),
        'desciption' => t('Specifies the entity for which the translation is ready for download.'),
      ),
    ),
  );
  $items['lingotek_rules_entity_all_translations_of_status'] = array(
    'group' => t('Lingotek'),
    'module' => 'lingotek',
    'label' => t('Entity has all translations of status'),
    'parameter' => array(
      'entity' => array(
        'type' => 'entity',
        'label' => t('Entity'),
        'desciption' => t('Specifies the entity for which the translation is ready for download.'),
      ),
      'status' => array(
        'type' => 'token',
        'label' => t('Status'),
        'description' => t('The Lingotek translation status'),
        'options list' => 'LingotekSync::getTargetStatusOptions',
        'restriction' => 'input',
      ),
    ),
  );
  $items['lingotek_rules_entity_has_profile'] = array(
    'group' => t('Lingotek'),
    'module' => 'lingotek',
    'label' => t('Entity has profile'),
    'parameter' => array(
      'entity' => array(
        'type' => 'entity',
        'label' => t('Entity'),
        'desciption' => t('Specifies the entity for which the translation was downloaded.'),
      ),
      'profile' => array(
        'type' => 'token',
        'label' => t('Profile'),
        'description' => t('The Lingotek profile assigned to this entity'),
        'options list' => 'lingotek_get_profiles_by_name',
        'restriction' => 'input',
      ),
    ),
  );
  return $items;
}