Browse Source

Allow a null abstract object in derivative alter hook

pull/673/head
Diego Pino Navarro 8 years ago committed by GitHub
parent
commit
b1f1da9293
  1. 2
      islandora.api.php

2
islandora.api.php

@ -746,7 +746,7 @@ function hook_cmodel_pid_islandora_derivative() {
/**
* Allows for the altering of defined derivative functions.
*/
function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object, $ds_modified_params = array()) {
function hook_islandora_derivative_alter(&$derivatives, AbstractObject $object = NULL, $ds_modified_params = array()) {
foreach ($derivatives as $key => $derivative) {
if ($derivative['destination_dsid'] == 'TN') {
unset($derivatives[$key]);

Loading…
Cancel
Save