materio_publications.features.inc 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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_image_default_styles().
  16. */
  17. function materio_publications_image_default_styles() {
  18. $styles = array();
  19. // Exported image style: publication-couv.
  20. $styles['publication-couv'] = array(
  21. 'label' => 'publication-couv',
  22. 'effects' => array(
  23. 16 => array(
  24. 'name' => 'image_scale',
  25. 'data' => array(
  26. 'width' => 480,
  27. 'height' => 480,
  28. 'upscale' => 1,
  29. ),
  30. 'weight' => 1,
  31. ),
  32. ),
  33. );
  34. return $styles;
  35. }
  36. /**
  37. * Implements hook_node_info().
  38. */
  39. function materio_publications_node_info() {
  40. $items = array(
  41. 'publication' => array(
  42. 'name' => t('Publication'),
  43. 'base' => 'node_content',
  44. 'description' => '',
  45. 'has_title' => '1',
  46. 'title_label' => t('Titre'),
  47. 'help' => '',
  48. ),
  49. );
  50. drupal_alter('node_info', $items);
  51. return $items;
  52. }
  53. /**
  54. * Implements hook_workflow_default_workflows().
  55. */
  56. function materio_publications_workflow_default_workflows() {
  57. $workflows = array();
  58. // Exported workflow: Publication
  59. $workflows['Publication'] = array(
  60. 'name' => 'Publication',
  61. 'tab_roles' => '',
  62. '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;}',
  63. 'states' => array(
  64. 0 => array(
  65. 'state' => '(creation)',
  66. 'weight' => -50,
  67. 'sysid' => 1,
  68. 'status' => 1,
  69. 'name' => 'Publication',
  70. ),
  71. 1 => array(
  72. 'state' => 'Importé',
  73. 'weight' => 0,
  74. 'sysid' => 0,
  75. 'status' => 1,
  76. 'name' => 'Publication',
  77. ),
  78. 2 => array(
  79. 'state' => 'Édité',
  80. 'weight' => 1,
  81. 'sysid' => 0,
  82. 'status' => 1,
  83. 'name' => 'Publication',
  84. ),
  85. 3 => array(
  86. 'state' => 'Masqué',
  87. 'weight' => 2,
  88. 'sysid' => 0,
  89. 'status' => 1,
  90. 'name' => 'Publication',
  91. ),
  92. 4 => array(
  93. 'state' => 'Publié',
  94. 'weight' => 3,
  95. 'sysid' => 0,
  96. 'status' => 1,
  97. 'name' => 'Publication',
  98. ),
  99. ),
  100. 'transitions' => array(
  101. 0 => array(
  102. 'roles' => 'workflow_features_author_name,administrator,root',
  103. 'state' => '(creation)',
  104. 'target_state' => 'Masqué',
  105. ),
  106. 1 => array(
  107. 'roles' => 'workflow_features_author_name,administrator,root',
  108. 'state' => '(creation)',
  109. 'target_state' => 'Publié',
  110. ),
  111. 2 => array(
  112. 'roles' => 'root',
  113. 'state' => '(creation)',
  114. 'target_state' => 'Importé',
  115. ),
  116. 3 => array(
  117. 'roles' => 'administrator,root',
  118. 'state' => 'Importé',
  119. 'target_state' => 'Édité',
  120. ),
  121. 4 => array(
  122. 'roles' => 'workflow_features_author_name,administrator,root',
  123. 'state' => 'Importé',
  124. 'target_state' => 'Masqué',
  125. ),
  126. 5 => array(
  127. 'roles' => 'workflow_features_author_name,administrator,root',
  128. 'state' => 'Importé',
  129. 'target_state' => 'Publié',
  130. ),
  131. 6 => array(
  132. 'roles' => 'root',
  133. 'state' => 'Édité',
  134. 'target_state' => 'Importé',
  135. ),
  136. 7 => array(
  137. 'roles' => 'workflow_features_author_name,administrator,root',
  138. 'state' => 'Édité',
  139. 'target_state' => 'Masqué',
  140. ),
  141. 8 => array(
  142. 'roles' => 'workflow_features_author_name,administrator,root',
  143. 'state' => 'Édité',
  144. 'target_state' => 'Publié',
  145. ),
  146. 9 => array(
  147. 'roles' => 'workflow_features_author_name,administrator,root',
  148. 'state' => 'Masqué',
  149. 'target_state' => 'Publié',
  150. ),
  151. 10 => array(
  152. 'roles' => 'root',
  153. 'state' => 'Masqué',
  154. 'target_state' => 'Importé',
  155. ),
  156. 11 => array(
  157. 'roles' => 'workflow_features_author_name,administrator,root',
  158. 'state' => 'Masqué',
  159. 'target_state' => 'Édité',
  160. ),
  161. 12 => array(
  162. 'roles' => 'workflow_features_author_name,administrator,root',
  163. 'state' => 'Publié',
  164. 'target_state' => 'Masqué',
  165. ),
  166. 13 => array(
  167. 'roles' => 'root',
  168. 'state' => 'Publié',
  169. 'target_state' => 'Importé',
  170. ),
  171. 14 => array(
  172. 'roles' => 'workflow_features_author_name,administrator,root',
  173. 'state' => 'Publié',
  174. 'target_state' => 'Édité',
  175. ),
  176. ),
  177. 'node_types' => array(
  178. 0 => 'breve',
  179. 1 => 'company',
  180. 2 => 'didactique',
  181. 3 => 'faq',
  182. 4 => 'looping_embed_video',
  183. 5 => 'materiau',
  184. 6 => 'page',
  185. 7 => 'publication',
  186. 8 => 'simplenews',
  187. ),
  188. );
  189. return $workflows;
  190. }