Skip to content

Hooks and Filters

Dickson Law edited this page Jan 30, 2018 · 2 revisions

Hooks and Filters

Below is a listing of hooks and filters used by this plugin. You can have your plugin attach to these hooks and filters directly instead of subclassing BatchUpload_Wizard_AbstractWizard.

Note: Hook and filter arguments are expressed as the name of the key in the $args variable.

Hooks

batch_upload_<job_type>_job_new

Hook for when a new job of the given type is started. You can use this to edit the started job or prepare other associated initializations.

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.

batch_upload_<job_type>_step_form

Hook for rendering the step view for working on a job of the given type.

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.
view Omeka_View The current view.
request Zend_Controller_Request_Abstract The current request.
partial_assigns BatchUpload_Application_DataContainer Variables for the current partial view.

batch_upload_<job_type>_step_process

Hook for processing submitted form data while working on a job of the given type.

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.
view Omeka_View The current view.
request Zend_Controller_Request_Abstract The current request.
partial_assigns BatchUpload_Application_DataContainer Variables for the current partial view.
get array Current value of $_GET.
post array Current value of $_POST.
files array Current value of $_FILES.

batch_upload_<job_type>_step_ajax

Hook for receiving AJAX requests while working on a job of the given type.

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.
view Omeka_View The current view.
request Zend_Controller_Request_Abstract The current request.
response BatchUpload_Application_DataContainer A data container representing the JSON response.
http BatchUpload_Application_DataContainer A data container with a status key for the HTTP status and a headers associative array for headers.
get array Current value of $_GET.
post array Current value of $_POST.
files array Current value of $_FILES.

Filters

batch_upload_register_job_type

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.
name string The name of the job.
progress string A string representation of the job's progress.
target string A string representation of the job's target.

batch_upload_<job_type>_job_row

Filter for changing the appearance of the job's row on the Job Listings table.

Arguments:

Argument Type Description
job BatchUpload_Job The current upload job.
name string The name of the job.
progress string A string representation of the job's progress.
target string A string representation of the job's target.