features_override.api.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Autogenerated hook that duplicates what alters are being exported via
  4. * features overrides.
  5. *
  6. * This hook should only ever be auto-exported.
  7. */
  8. function hook_features_override_default() {
  9. return array();
  10. }
  11. /**
  12. * Allows modules to clean up the default and normal components.
  13. *
  14. * For whatever reason, extra information or inconstancies may be introduced
  15. * into the normal (current) or default (defined) components. This hook allows
  16. * modules to hook in and clean up whatever they need to.
  17. *
  18. * @param $default
  19. * The object or array as defined in a default hook, unaltered.
  20. * @param $normal
  21. * The current object, either the current default + alters or database
  22. * overrides.
  23. * @param $context
  24. * an array containing module and component information.
  25. */
  26. function hook_features_override_component_overrides_alter(&$default, &$normal, $context) {
  27. if ($context['component'] == 'views_view') {
  28. unset($normal->api_version);
  29. }
  30. }
  31. /**
  32. * Component hook. The hook should be implemented using the name ot the
  33. * component, not the module, eg. [component]_features_export() rather than
  34. * [module]_features_export().
  35. *
  36. * Renders an addition to a feature.
  37. *
  38. * @return string
  39. * A rendered string.
  40. * @see features_override_export_render_addition();
  41. */
  42. function hook_features_override_export_render_addition() {
  43. }
  44. /**
  45. * Component hook. The hook should be implemented using the name ot the
  46. * component, not the module, eg. [component]_features_export() rather than
  47. * [module]_features_export().
  48. *
  49. * Renders a deletion to a feature.
  50. *
  51. * @return string
  52. * A rendered string.
  53. * @see features_override_export_render_deletion();
  54. */
  55. function hook_features_override_export_render_deletion() {
  56. }