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)
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.