In my project we need to use an external library, for generating barcode, so i work on a hook_barcode_type to let other module define her own plugin.

example of use for this hook :

/**
 * Implementation of hook_barcode_type
 */
function module_foo_barcode_type() {
  $plugins['ean_custom'] = array(
      'EAN-13-CUSTOM' => t('EAN-13 Custom'),
      'ISBN-CUSTOM' => t('ISBN Custom')
  );

  return array('module_foo' => $plugins);
}

And the plugins can be found in the module_foo path folder plugins/ean_custom.inc

Thanks for your work.

Comments

skyredwang’s picture

Status: Needs work » Needs review

this is a nice thing to add