API for Exportables 1.x for Drupal 6 =========================== *hook_exportables()* --------------------------- Returns a keyed array of information about a type of exportable. Keys: - hook name: The name of the hook which defines the in-code items. - load function: The function which loads items by ID. - save function: Function to save the object. - load all function: The function which returns an array of all valid items. - update function: Function to update in-db definition of the object. Defaults to save function if none specified. - delete function: Function to delete the object from the database. - id property: The property of the object defining it's ID. - title property: The property of the object defining it's title, from which the machine readable name is derived. - storage type: How the item is stored (array/object). - unique properties: an array of properties to be erased when exporting to code. *exportables_export_id($type, $id, $indent = '')* --------------------------- Exports an object given it's type and ID. Returns a string which is the export (usually the export of an array or object)*. The string is indented by $indent amount. *exportables_export_machine($type, $machine, $indent = '')* --------------------------- Exports an object given it's type and machine-readable name. Returns a string which is the export (usually the export of an array or object)*. The string is indented by $indent amount. *exportables_sync($type = '')* --------------------------- Synchronizes the in-code version to the database. By default, syncs all items, however you can pass in a string to select the type of item to synchronize or an array for multiple types. It does this by retrieving the ID matched to the machine name of the in-code item. If that exists, then it compares the database version of the item to the previously stored in-code item and if they are the same, it updates them. If the ID doesn't exist, then it creates a new item. *exportables_machine_get($type, &$object)* --------------------------- Returns the machine-readable name of an object given the type and object itself. Additionally adds $object->machine and sets it to the machine name of the object. *exportables_machine_load_id($type, $machine)* --------------------------- Gets a machine-readable name given object and type. Taxonomy Exportables =========================== *hook_taxonomy_default_vocabularies()* --------------------------- Returns an array of vocabularies exported with *exportables_export*