Skip to content

Export_Plugins

Jason Pell edited this page Jun 21, 2013 · 1 revision

Needed functions

There are several standard functions that must be included in each export plugin:

  • get_file_content_type()
  • get_file_extension()
  • get_display_name()
  • get_plugin_type() - Return 'row' or 'item'
  • Optional: file_header($title)
  • Optional: file_footer()
  • Optional: http_header($filename, $content_type)
    If this method exists, it is assumed that it will provide the required header(...) calls to stream the headers out to the browser. You can also implement a dummy version of this function if you want to dump the whole content as part of the close() method.
Depending on the plugin_type, there are extra methods required.
  • Row based:
    • item_row($columns)
    • Optional: prompt_header($columns)
    • Optional: data_header($columns)
    • Optional: close()
  • Item based:
    • start_item($item_id, $s_item_type, $title)
    • end_item($item_id)
    • start_item_instance($instance_no, $owner_id, $borrow_duration, $s_status_type, $status_comment)
    • end_item_instance()
    • item_attribute($item_id, $s_attribute_type, $order_no, $attribute_val)

The wiki migration is a work in progress. I am aware that some images don't currently work.

Clone this wiki locally