entity_translation.rules.inc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * @file
  4. * This file provides the rules integration for this module.
  5. */
  6. /**
  7. * Implements of hook_rules_event_info().
  8. */
  9. function entity_translation_rules_event_info() {
  10. $events = array(
  11. 'entity_translation_insert' => array(
  12. 'label' => t('After adding an entity translation'),
  13. 'group' => t('Entity'),
  14. 'variables' => array(
  15. 'entity_type' => array(
  16. 'type' => 'text',
  17. 'label' => t('Entity type'),
  18. ),
  19. 'entity' => array(
  20. 'type' => 'entity',
  21. 'label' => t('Entity'),
  22. ),
  23. 'language_code' => array(
  24. 'type' => 'text',
  25. 'label' => t('Language code'),
  26. ),
  27. 'values' => array(
  28. 'type' => 'list',
  29. 'label' => t('Raw values'),
  30. 'optional' => TRUE,
  31. ),
  32. ),
  33. ),
  34. 'entity_translation_update' => array(
  35. 'label' => t('After updating an entity translation'),
  36. 'group' => t('Entity'),
  37. 'variables' => array(
  38. 'entity_type' => array(
  39. 'type' => 'text',
  40. 'label' => t('Entity type'),
  41. ),
  42. 'entity' => array(
  43. 'type' => 'entity',
  44. 'label' => t('Entity'),
  45. ),
  46. 'language_code' => array(
  47. 'type' => 'text',
  48. 'label' => t('Language code'),
  49. ),
  50. 'values' => array(
  51. 'type' => 'list',
  52. 'label' => t('Raw values'),
  53. 'optional' => TRUE,
  54. ),
  55. ),
  56. ),
  57. 'entity_translation_delete' => array(
  58. 'label' => t('After deleting an entity translation'),
  59. 'group' => t('Entity'),
  60. 'variables' => array(
  61. 'entity_type' => array(
  62. 'type' => 'text',
  63. 'label' => t('Entity type'),
  64. ),
  65. 'entity' => array(
  66. 'type' => 'entity',
  67. 'label' => t('Entity'),
  68. ),
  69. 'language_code' => array(
  70. 'type' => 'text',
  71. 'label' => t('Language code'),
  72. ),
  73. ),
  74. ),
  75. );
  76. return $events;
  77. }