Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. function universal_document_creator_rules_action_info() {
  2. return array(
  3. 'udc_createdoc' => array(
  4. 'label' => t('Convert Docucument with UDC'),
  5. 'group' => t('Custom'),
  6. 'parameter' => array(
  7. 'templateid' => array(
  8. 'type' => 'integer',
  9. 'label' => t('Template ID'),
  10. 'description' => t('Enter the ID of the template'),
  11. ),
  12. 'accountmanagersid' => array(
  13. 'type' => 'integer',
  14. 'label' => t('The number of the account manager'),
  15. 'description' => t('The node ID of the number of the account manager.'),
  16. ),
  17. 'filetypeid' => array(
  18. 'type' => 'integer',
  19. 'label' => t('File type ID'),
  20. 'description' => t('The filetype ID. 1 = Word, 2 is PDF'),
  21. ),
  22. 'cvnodeid' => array(
  23. 'type' => 'integer',
  24. 'label' => t('CV node ID'),
  25. 'description' => t('The node ID from the CV'),
  26. ),
  27. ),
  28. 'provides' => array(
  29. 'filename' => array(
  30. 'type' => 'text',
  31. 'label' => t('File name'),
  32. ),
  33. ),
  34. ),
  35. );
  36. }
  37.  
  38. <?php
  39.  
  40. // This callback creates the document using the parameters provided through rules' UI
  41. function udc_createdoc($templateid, $accountmanagersid, $filetypeid, $cvnodeid) {
  42.  
  43. $FileToSave == "foo";
  44. drupal_set_message(t('test why is this not on my screen'), 'error');
  45.  
  46. return $FileToSave;
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement