materio_publications.features.inc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. /**
  3. * @file
  4. * materio_publications.features.inc
  5. */
  6. /**
  7. * Implements hook_ctools_plugin_api().
  8. */
  9. function materio_publications_ctools_plugin_api($module = NULL, $api = NULL) {
  10. if ($module == "strongarm" && $api == "strongarm") {
  11. return array("version" => "1");
  12. }
  13. }
  14. /**
  15. * Implements hook_node_info().
  16. */
  17. function materio_publications_node_info() {
  18. $items = array(
  19. 'publication' => array(
  20. 'name' => t('Publication'),
  21. 'base' => 'node_content',
  22. 'description' => '',
  23. 'has_title' => '1',
  24. 'title_label' => t('Titre'),
  25. 'help' => '',
  26. ),
  27. );
  28. drupal_alter('node_info', $items);
  29. return $items;
  30. }
  31. /**
  32. * Implements hook_workflow_default_workflows().
  33. */
  34. function materio_publications_workflow_default_workflows() {
  35. $workflows = array();
  36. // Exported workflow: Publication
  37. $workflows['Publication'] = array(
  38. 'name' => 'Publication',
  39. 'tab_roles' => '',
  40. 'options' => 'a:4:{s:16:"comment_log_node";i:0;s:15:"comment_log_tab";i:0;s:13:"name_as_title";i:0;s:12:"watchdog_log";i:1;}',
  41. 'states' => array(
  42. 0 => array(
  43. 'state' => '(creation)',
  44. 'weight' => -50,
  45. 'sysid' => 1,
  46. 'status' => 1,
  47. 'name' => 'Publication',
  48. ),
  49. 1 => array(
  50. 'state' => 'Importé',
  51. 'weight' => 0,
  52. 'sysid' => 0,
  53. 'status' => 1,
  54. 'name' => 'Publication',
  55. ),
  56. 2 => array(
  57. 'state' => 'Édité',
  58. 'weight' => 1,
  59. 'sysid' => 0,
  60. 'status' => 1,
  61. 'name' => 'Publication',
  62. ),
  63. 3 => array(
  64. 'state' => 'Masqué',
  65. 'weight' => 2,
  66. 'sysid' => 0,
  67. 'status' => 1,
  68. 'name' => 'Publication',
  69. ),
  70. 4 => array(
  71. 'state' => 'Publié',
  72. 'weight' => 3,
  73. 'sysid' => 0,
  74. 'status' => 1,
  75. 'name' => 'Publication',
  76. ),
  77. ),
  78. 'transitions' => array(
  79. 0 => array(
  80. 'roles' => 'workflow_features_author_name,administrator,root',
  81. 'state' => '(creation)',
  82. 'target_state' => 'Masqué',
  83. ),
  84. 1 => array(
  85. 'roles' => 'workflow_features_author_name,administrator,root',
  86. 'state' => '(creation)',
  87. 'target_state' => 'Publié',
  88. ),
  89. 2 => array(
  90. 'roles' => 'root',
  91. 'state' => '(creation)',
  92. 'target_state' => 'Importé',
  93. ),
  94. 3 => array(
  95. 'roles' => 'administrator,root',
  96. 'state' => 'Importé',
  97. 'target_state' => 'Édité',
  98. ),
  99. 4 => array(
  100. 'roles' => 'workflow_features_author_name,administrator,root',
  101. 'state' => 'Importé',
  102. 'target_state' => 'Masqué',
  103. ),
  104. 5 => array(
  105. 'roles' => 'workflow_features_author_name,administrator,root',
  106. 'state' => 'Importé',
  107. 'target_state' => 'Publié',
  108. ),
  109. 6 => array(
  110. 'roles' => 'root',
  111. 'state' => 'Édité',
  112. 'target_state' => 'Importé',
  113. ),
  114. 7 => array(
  115. 'roles' => 'workflow_features_author_name,administrator,root',
  116. 'state' => 'Édité',
  117. 'target_state' => 'Masqué',
  118. ),
  119. 8 => array(
  120. 'roles' => 'workflow_features_author_name,administrator,root',
  121. 'state' => 'Édité',
  122. 'target_state' => 'Publié',
  123. ),
  124. 9 => array(
  125. 'roles' => 'workflow_features_author_name,administrator,root',
  126. 'state' => 'Masqué',
  127. 'target_state' => 'Publié',
  128. ),
  129. 10 => array(
  130. 'roles' => 'root',
  131. 'state' => 'Masqué',
  132. 'target_state' => 'Importé',
  133. ),
  134. 11 => array(
  135. 'roles' => 'workflow_features_author_name,administrator,root',
  136. 'state' => 'Masqué',
  137. 'target_state' => 'Édité',
  138. ),
  139. 12 => array(
  140. 'roles' => 'workflow_features_author_name,administrator,root',
  141. 'state' => 'Publié',
  142. 'target_state' => 'Masqué',
  143. ),
  144. 13 => array(
  145. 'roles' => 'root',
  146. 'state' => 'Publié',
  147. 'target_state' => 'Importé',
  148. ),
  149. 14 => array(
  150. 'roles' => 'workflow_features_author_name,administrator,root',
  151. 'state' => 'Publié',
  152. 'target_state' => 'Édité',
  153. ),
  154. ),
  155. 'node_types' => array(
  156. 0 => 'breve',
  157. 1 => 'company',
  158. 2 => 'didactique',
  159. 3 => 'faq',
  160. 4 => 'looping_embed_video',
  161. 5 => 'materiau',
  162. 6 => 'page',
  163. 7 => 'publication',
  164. 8 => 'simplenews',
  165. ),
  166. );
  167. return $workflows;
  168. }