Development - Hokoku (Zenbu Export) for EE3

Development documentation

This documentation is for the EE2 version of Hokoku (1.x)

By default, Hokoku exports data as it displayed in the Zenbu module, but with HTML markup stripped out. Starting with Hokoku 1.2.0, export options can be added to modify how data is exported based on the data presented by Zenbu.

Hokoku first looks for Hokoku functions in the third-party’s fieldtype file (ft.field.php). If Hokoku functions are not found, Hokoku looks for fieldtype support files corresponding to a fieldtype in the hokoku/fieldtypes folder. As a final fallback, if Hokoku functions are still not found, the exported data will be the data displaed by Zenbu, with HTML markup stripped.

Fieldtype framework functions

hokoku_modify_custom_field_data

Modify data provided by Zenbu

hokoku_modify_custom_field_data($field_data, $export_profile, $info_data)

Parameters

  • $field_data (string) The data in the custom field displayed in Zenbu
  • $export_profile (array) The export profile settings
  • $info_data (array) An array of the current entry_id, field_id, and an array of field information (ids, fieldtype, name…)

Return

$field_data (string) The modified data, exported by Hokoku


hokoku_display_export_settings

Used to create fieldtype-specific options for the export profile. These options modify how Hokoku will export data.

hokoku_display_export_settings($fieldtype = '', $extra_export_settings = array())

Parameters

  • $fieldtype (string) The fieldtype name
  • $extra_export_settings (array) An array of extra export settings for the profile

Return

$output (string) A string, usually HTML, containing options for the fieldtype.


Auto-login on future visits

Forgot your password?

×