diff options
Diffstat (limited to 'extensions/Example/Extension.pm')
-rw-r--r-- | extensions/Example/Extension.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index 835d36f80..26a91b789 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -354,6 +354,18 @@ sub object_before_create { } } +sub object_before_delete { + my ($self, $args) = @_; + + my $object = $args->{'object'}; + + # Note that this is a made-up class, for this example. + if ($object->isa('Bugzilla::ExampleObject')) { + my $id = $object->id; + warn "An object with id $id is about to be deleted!"; + } +} + sub object_before_set { my ($self, $args) = @_; |