From 123a55849a823f144f13f383461ec33ca3602944 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 10 Jun 2022 08:18:37 +0100 Subject: [PATCH] Bug 29623: (QA follow-up) Add POD to Koha::CirculationRules Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/CirculationRules.pm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index 2ddaa00f6b..81590785e3 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -209,6 +209,18 @@ sub rule_kinds { =head3 get_effective_rule + my $effective_rule = Koha::CirculationRules->get_effective_rule( + { + rule_name => $name, + categorycode => $categorycode, + itemtype => $itemtype, + branchcode => $branchcode + } + ); + +Return the effective rule object for the rule associated with the criteria passed. + + =cut sub get_effective_rule { @@ -252,6 +264,24 @@ sub get_effective_rule { return $rule; } +=head3 get_effective_rule_value + + my $effective_rule_value = Koha::CirculationRules->get_effective_rule_value( + { + rule_name => $name, + categorycode => $categorycode, + itemtype => $itemtype, + branchcode => $branchcode + } + ); + +Return the effective value for the rule associated with the criteria passed. + +This is a cached method so should be used in preference to get_effective_rule where possible +to aid performance. + +=cut + sub get_effective_rule_value { my ( $self, $params ) = @_; @@ -600,7 +630,7 @@ sub guess_article_requestable_itemtypes { return $res; } -=head3 get_daysmode_effective_value +=head3 get_effective_daysmode Return the value for daysmode defined in the circulation rules. If not defined (or empty string), the value of the system preference useDaysMode is returned -- 2.39.5