Lines 268-273
sub store {
Link Here
|
268 |
|
268 |
|
269 |
logaction( "MEMBERS", "CREATE", $self->borrowernumber, "" ) |
269 |
logaction( "MEMBERS", "CREATE", $self->borrowernumber, "" ) |
270 |
if C4::Context->preference("BorrowersLog"); |
270 |
if C4::Context->preference("BorrowersLog"); |
|
|
271 |
|
272 |
$self->get_from_storage->_after_patron_action_hooks({ action => 'create' }); |
271 |
} |
273 |
} |
272 |
else { #ModMember |
274 |
else { #ModMember |
273 |
|
275 |
|
Lines 341-346
sub store {
Link Here
|
341 |
|
343 |
|
342 |
# Final store |
344 |
# Final store |
343 |
$self = $self->SUPER::store; |
345 |
$self = $self->SUPER::store; |
|
|
346 |
|
347 |
$self->get_from_storage->_after_patron_action_hooks({ action => 'modify' }); |
344 |
} |
348 |
} |
345 |
} |
349 |
} |
346 |
); |
350 |
); |
Lines 395-400
sub delete {
Link Here
|
395 |
$self->SUPER::delete; |
399 |
$self->SUPER::delete; |
396 |
|
400 |
|
397 |
logaction( "MEMBERS", "DELETE", $self->borrowernumber, "" ) if C4::Context->preference("BorrowersLog"); |
401 |
logaction( "MEMBERS", "DELETE", $self->borrowernumber, "" ) if C4::Context->preference("BorrowersLog"); |
|
|
402 |
|
403 |
$self->_after_patron_action_hooks({ action => 'delete' }); |
398 |
} |
404 |
} |
399 |
); |
405 |
); |
400 |
return $self; |
406 |
return $self; |
Lines 1787-1792
sub to_api_mapping {
Link Here
|
1787 |
|
1793 |
|
1788 |
=head2 Internal methods |
1794 |
=head2 Internal methods |
1789 |
|
1795 |
|
|
|
1796 |
=head3 _after_patron_action_hooks |
1797 |
|
1798 |
Helper method that takes care of calling all plugin hooks |
1799 |
|
1800 |
=cut |
1801 |
|
1802 |
sub _after_patron_action_hooks { |
1803 |
my ( $self, $params ) = @_; |
1804 |
|
1805 |
my $action = $params->{action}; |
1806 |
|
1807 |
Koha::Plugins->call( |
1808 |
'after_patron_action', |
1809 |
{ |
1810 |
action => $action, |
1811 |
patron => $self, |
1812 |
patron_id => $self->borrowernumber, |
1813 |
} |
1814 |
); |
1815 |
} |
1816 |
|
1790 |
=head3 _type |
1817 |
=head3 _type |
1791 |
|
1818 |
|
1792 |
=cut |
1819 |
=cut |
1793 |
- |
|
|