Closed (fixed)
Project:
Diff
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2011 at 10:09 UTC
Updated:
29 Jul 2012 at 10:41 UTC
Hi,
wouldn't it be useful to write a basic guide or stub aimed at module developers explaining how to easily add diff functionality to their module, especially if their module is field based?
I wrote a simple module (still in sandbox) and it is not included in the diff panel if changes occur.
How do I add this to my module, or must this functionality be added to the node.inc?
Any help would be greatful.
ps: If anyone want to test the simple phone field module I wrote: http://drupal.org/sandbox/tecjam/1320886
Comments
Comment #1
alan d. commentedCurrently, fields are not handled by the module. While it is possible, I wouldn't recommend it at the moment. I'm hoping to get #1365750: Generalize API and Integrate with core field types pushed into 7.x-2.x and then it is as simple as:
1) Create the file "simple_phone_field.diff.inc"
2) Implement the hook
However, you can fake this functionality in 7.x-1.x by populating the field property 'value' on load. Use the same logic for generating the value property as above.
Comment #2
tecjam commentedThat's a great starting point. Thanks for your input.
Comment #3
alan d. commentedThe initial example is now usable with the new branch, 7.x-3.0-alpha1 or 7.x-3.0-dev.
This info can be found in the readme / api / core field examples.
Comment #4
alan d. commentedComment #5.0
(not verified) commentedlink to module