drupal-7.trigger.database.php 509 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @file
  4. * Test content for the trigger upgrade path.
  5. */
  6. // Add several trigger configurations.
  7. db_insert('trigger_assignments')->fields(array(
  8. 'hook',
  9. 'aid',
  10. 'weight',
  11. ))
  12. ->values(array(
  13. 'hook' => 'node_presave',
  14. 'aid' => 'node_publish_action',
  15. 'weight' => '1',
  16. ))
  17. ->values(array(
  18. 'hook' => 'comment_presave',
  19. 'aid' => 'comment_publish_action',
  20. 'weight' => '1',
  21. ))
  22. ->values(array(
  23. 'hook' => 'comment_delete',
  24. 'aid' => 'node_save_action',
  25. 'weight' => '1',
  26. ))
  27. ->execute();