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.
| Comment | File | Size | Author |
|---|---|---|---|
| barcode-hook_barcode_type-no_drupal_issue.patch | 7.94 KB | delta |
Comments
Comment #1
skyredwangthis is a nice thing to add