Plugin: batch edit

I'm putting together a little plugin that appends a checkbox named 'migration-helper' to the batch-edit form. If checked, the selected items will be modified to copy specific Dublin Core values over to related fields in Item Type metadata. So far, I've been able to add the checkbox but am not entirely sure how to use the items_batch_edit_custom hook, nor how to modify item type and item type metadata from within a plugin.

class MyPluginNamePlugin extends Omeka_Plugin_AbstractPlugin

    protected $_hooks = array(

    public function hookAdminItemsBatchEditForm(){

    	require dirname(__FILE__) . '/batch_edit_append.php';


    public function hookItemsBatchEditCustom(){

	// Um...???



Where can I look to find examples of this hook in use and info about batch editing item records via a plugin?


The documentation for the hook, as ever, is sparse, but it does have enough to give you a pretty good starting point.

The arguments to the hook are 'item', the Item being edited, and 'custom', the array of "custom" properties on the batch edit form. (Note, like any other hook, you need $args as an argument to your function, and you'd access these as $args['item'] and $args['custom'] within the function.)

The easiest way to edit the item is probably by using the update_item function. The usage of the function should be somewhat straightforward. If you can believe it, the documentation for it was even more sparse until just now.

Thanks John, this was super helpful!