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 1794-1799
sub to_api_mapping {
Link Here
|
1794 |
|
1800 |
|
1795 |
=head2 Internal methods |
1801 |
=head2 Internal methods |
1796 |
|
1802 |
|
|
|
1803 |
=head3 _after_patron_action_hooks |
1804 |
|
1805 |
Helper method that takes care of calling all plugin hooks |
1806 |
|
1807 |
=cut |
1808 |
|
1809 |
sub _after_patron_action_hooks { |
1810 |
my ( $self, $params ) = @_; |
1811 |
|
1812 |
my $action = $params->{action}; |
1813 |
|
1814 |
Koha::Plugins->call( |
1815 |
'after_patron_action', |
1816 |
{ |
1817 |
action => $action, |
1818 |
patron => $self, |
1819 |
patron_id => $self->borrowernumber, |
1820 |
} |
1821 |
); |
1822 |
} |
1823 |
|
1797 |
=head3 _type |
1824 |
=head3 _type |
1798 |
|
1825 |
|
1799 |
=cut |
1826 |
=cut |
1800 |
- |
|
|