maillog.views.inc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?php
  2. /**
  3. * @file
  4. * Views integration for maillog module.
  5. */
  6. /**
  7. * Implements hook_views_data().
  8. */
  9. function maillog_views_data() {
  10. $data['maillog']['table']['group'] = t('Maillog');
  11. $data['maillog']['table']['base'] = array(
  12. 'field' => 'idmaillog',
  13. 'title' => t('Maillog'),
  14. 'help' => t("This table contains the logged e-mails."),
  15. 'weight' => -10,
  16. );
  17. $data['maillog']['idmaillog'] = array(
  18. 'title' => t('Maillog_ID'),
  19. 'help' => t('The primary key of the maillog table.'),
  20. 'field' => array(
  21. 'id' => 'standard',
  22. 'click sortable' => TRUE,
  23. ),
  24. 'sort' => array(
  25. 'id' => 'standard',
  26. ),
  27. 'filter' => array(
  28. 'id' => 'string',
  29. ),
  30. 'argument' => array(
  31. 'id' => 'string',
  32. ),
  33. );
  34. $data['maillog']['header_message_id'] = array(
  35. 'title' => t('Message_ID'),
  36. 'help' => t("The 'Message_ID' e-mail address."),
  37. 'field' => array(
  38. 'id' => 'standard',
  39. 'click sortable' => TRUE,
  40. ),
  41. 'sort' => array(
  42. 'id' => 'standard',
  43. ),
  44. 'filter' => array(
  45. 'id' => 'string',
  46. ),
  47. 'argument' => array(
  48. 'id' => 'string',
  49. ),
  50. );
  51. $data['maillog']['header_from'] = array(
  52. 'title' => t('From'),
  53. 'help' => t("The 'From' field of the e-mail address."),
  54. 'field' => array(
  55. 'id' => 'standard',
  56. 'click sortable' => TRUE,
  57. ),
  58. 'sort' => array(
  59. 'id' => 'standard',
  60. ),
  61. 'filter' => array(
  62. 'id' => 'string',
  63. ),
  64. 'argument' => array(
  65. 'id' => 'string',
  66. ),
  67. );
  68. $data['maillog']['header_to'] = array(
  69. 'title' => t('To'),
  70. 'help' => t("The 'To' field of the e-mail address."),
  71. 'field' => array(
  72. 'id' => 'standard',
  73. 'click sortable' => TRUE,
  74. ),
  75. 'sort' => array(
  76. 'id' => 'standard',
  77. ),
  78. 'filter' => array(
  79. 'id' => 'string',
  80. ),
  81. 'argument' => array(
  82. 'id' => 'string',
  83. ),
  84. );
  85. $data['maillog']['header_reply_to'] = array(
  86. 'title' => t('Reply To'),
  87. 'help' => t("The 'Reply-To' field of the e-mail address."),
  88. 'field' => array(
  89. 'id' => 'standard',
  90. 'click sortable' => TRUE,
  91. ),
  92. 'sort' => array(
  93. 'id' => 'standard',
  94. ),
  95. 'filter' => array(
  96. 'id' => 'string',
  97. ),
  98. 'argument' => array(
  99. 'id' => 'string',
  100. ),
  101. );
  102. $data['maillog']['header_all'] = array(
  103. 'title' => t('Header'),
  104. 'help' => t("The 'Header' field of the e-mail."),
  105. 'field' => array(
  106. 'id' => 'standard',
  107. 'click sortable' => TRUE,
  108. ),
  109. 'sort' => array(
  110. 'id' => 'standard',
  111. ),
  112. 'filter' => array(
  113. 'id' => 'string',
  114. ),
  115. 'argument' => array(
  116. 'id' => 'string',
  117. ),
  118. );
  119. $data['maillog']['body'] = array(
  120. 'title' => t('Body'),
  121. 'help' => t("The 'Body' field of the e-mail."),
  122. 'field' => array(
  123. 'id' => 'standard',
  124. 'click sortable' => TRUE,
  125. ),
  126. 'sort' => array(
  127. 'id' => 'standard',
  128. ),
  129. 'filter' => array(
  130. 'id' => 'string',
  131. ),
  132. 'argument' => array(
  133. 'id' => 'string',
  134. ),
  135. );
  136. $data['maillog']['subject'] = array(
  137. 'title' => t('Subject'),
  138. 'help' => t("The 'Subject' field of the e-mail."),
  139. 'field' => array(
  140. 'id' => 'standard',
  141. 'click sortable' => TRUE,
  142. ),
  143. 'sort' => array(
  144. 'id' => 'standard',
  145. ),
  146. 'filter' => array(
  147. 'id' => 'string',
  148. ),
  149. 'argument' => array(
  150. 'id' => 'string',
  151. ),
  152. );
  153. $data['maillog']['sent_date'] = array(
  154. 'title' => t('Date'),
  155. 'help' => t("The 'Date' field of the e-mail."),
  156. 'field' => array(
  157. 'id' => 'date',
  158. 'click sortable' => TRUE,
  159. ),
  160. 'sort' => array(
  161. 'id' => 'date',
  162. ),
  163. 'filter' => array(
  164. 'id' => 'date',
  165. ),
  166. 'argument' => array(
  167. 'id' => 'string',
  168. ),
  169. );
  170. $data['maillog']['delete_maillog'] = array(
  171. 'field' => array(
  172. 'title' => t('Delete link'),
  173. 'help' => t('Provide a simple link to delete an eMail entry from the maillog table.'),
  174. 'id' => 'maillog_field_delete',
  175. 'real field' => 'idmaillog',
  176. ),
  177. );
  178. return $data;
  179. }