clameurs.features.inc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * @file
  4. * clameurs.features.inc
  5. */
  6. /**
  7. * Implements hook_default_cer().
  8. */
  9. function clameurs_default_cer() {
  10. $items = array();
  11. $items['node:documentair:field_thematique*node:thematique:field_eclairages'] = entity_import('cer', '{
  12. "cer_bidirectional" : { "und" : [ { "value" : "1" } ] },
  13. "cer_enabled" : { "und" : [ { "value" : "1" } ] },
  14. "cer_left" : { "und" : [ { "path" : "node:documentair:field_thematique" } ] },
  15. "cer_right" : { "und" : [ { "path" : "node:thematique:field_eclairages" } ] },
  16. "cer_weight" : { "und" : [ { "value" : "0" } ] },
  17. "identifier" : "node:documentair:field_thematique*node:thematique:field_eclairages"
  18. }');
  19. $items['node:thematique:field_episodes*node:episode:field_thematique'] = entity_import('cer', '{
  20. "cer_bidirectional" : { "und" : [ { "value" : "1" } ] },
  21. "cer_enabled" : { "und" : [ { "value" : "1" } ] },
  22. "cer_left" : { "und" : [ { "path" : "node:thematique:field_episodes" } ] },
  23. "cer_right" : { "und" : [ { "path" : "node:episode:field_thematique" } ] },
  24. "cer_weight" : { "und" : [ { "value" : "0" } ] },
  25. "identifier" : "node:thematique:field_episodes*node:episode:field_thematique"
  26. }');
  27. return $items;
  28. }
  29. /**
  30. * Implements hook_ctools_plugin_api().
  31. */
  32. function clameurs_ctools_plugin_api($module = NULL, $api = NULL) {
  33. if ($module == "field_group" && $api == "field_group") {
  34. return array("version" => "1");
  35. }
  36. if ($module == "page_manager" && $api == "pages_default") {
  37. return array("version" => "1");
  38. }
  39. if ($module == "panels_mini" && $api == "panels_default") {
  40. return array("version" => "1");
  41. }
  42. if ($module == "strongarm" && $api == "strongarm") {
  43. return array("version" => "1");
  44. }
  45. }
  46. /**
  47. * Implements hook_node_info().
  48. */
  49. function clameurs_node_info() {
  50. $items = array(
  51. 'documentair' => array(
  52. 'name' => t('Documentaire'),
  53. 'base' => 'node_content',
  54. 'description' => '',
  55. 'has_title' => '1',
  56. 'title_label' => t('Titre'),
  57. 'help' => '',
  58. ),
  59. 'episode' => array(
  60. 'name' => t('Épisode'),
  61. 'base' => 'node_content',
  62. 'description' => '',
  63. 'has_title' => '1',
  64. 'title_label' => t('Titre'),
  65. 'help' => '',
  66. ),
  67. 'thematique' => array(
  68. 'name' => t('Thematique'),
  69. 'base' => 'node_content',
  70. 'description' => '',
  71. 'has_title' => '1',
  72. 'title_label' => t('Titre'),
  73. 'help' => '',
  74. ),
  75. );
  76. drupal_alter('node_info', $items);
  77. return $items;
  78. }