| Filename | /home/vagrant/kohaclone/Koha/Template/Plugin/AudioAlerts.pm |
| Statements | Executed 0 statements in 0s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 28µs | 114µs | Koha::Template::Plugin::AudioAlerts::BEGIN@20 |
| 1 | 1 | 1 | 21µs | 76µs | Koha::Template::Plugin::AudioAlerts::BEGIN@25 |
| 1 | 1 | 1 | 15µs | 18µs | Koha::Template::Plugin::AudioAlerts::BEGIN@27 |
| 1 | 1 | 1 | 13µs | 45µs | Koha::Template::Plugin::AudioAlerts::BEGIN@22 |
| 1 | 1 | 1 | 10µs | 101µs | Koha::Template::Plugin::AudioAlerts::BEGIN@23 |
| 1 | 1 | 1 | 6µs | 6µs | Koha::Template::Plugin::AudioAlerts::BEGIN@28 |
| 0 | 0 | 0 | 0s | 0s | Koha::Template::Plugin::AudioAlerts::AudioAlerts |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Koha::Template::Plugin::AudioAlerts; | ||||
| 2 | |||||
| 3 | # Copyright ByWater Solutions 2013 | ||||
| 4 | |||||
| 5 | # This file is part of Koha. | ||||
| 6 | # | ||||
| 7 | # Koha is free software; you can redistribute it and/or modify it | ||||
| 8 | # under the terms of the GNU General Public License as published by | ||||
| 9 | # the Free Software Foundation; either version 3 of the License, or | ||||
| 10 | # (at your option) any later version. | ||||
| 11 | # | ||||
| 12 | # Koha is distributed in the hope that it will be useful, but | ||||
| 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| 15 | # GNU General Public License for more details. | ||||
| 16 | # | ||||
| 17 | # You should have received a copy of the GNU General Public License | ||||
| 18 | # along with Koha; if not, see <http://www.gnu.org/licenses>. | ||||
| 19 | |||||
| 20 | 2 | 199µs | # spent 114µs (28+85) within Koha::Template::Plugin::AudioAlerts::BEGIN@20 which was called:
# once (28µs+85µs) by Template::Plugins::_load at line 20 # spent 114µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@20
# spent 86µs making 1 call to Modern::Perl::import | ||
| 21 | |||||
| 22 | 2 | 77µs | # spent 45µs (13+32) within Koha::Template::Plugin::AudioAlerts::BEGIN@22 which was called:
# once (13µs+32µs) by Template::Plugins::_load at line 22 # spent 45µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@22
# spent 32µs making 1 call to Exporter::import | ||
| 23 | 2 | 191µs | # spent 101µs (10+90) within Koha::Template::Plugin::AudioAlerts::BEGIN@23 which was called:
# once (10µs+90µs) by Template::Plugins::_load at line 23 # spent 101µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@23
# spent 90µs making 1 call to JSON::import | ||
| 24 | |||||
| 25 | 2 | 130µs | # spent 76µs (21+55) within Koha::Template::Plugin::AudioAlerts::BEGIN@25 which was called:
# once (21µs+55µs) by Template::Plugins::_load at line 25 # spent 76µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@25
# spent 55µs making 1 call to base::import | ||
| 26 | |||||
| 27 | 2 | 21µs | # spent 18µs (15+3) within Koha::Template::Plugin::AudioAlerts::BEGIN@27 which was called:
# once (15µs+3µs) by Template::Plugins::_load at line 27 # spent 18µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@27
# spent 3µs making 1 call to C4::Context::import | ||
| 28 | 1 | 6µs | # spent 6µs within Koha::Template::Plugin::AudioAlerts::BEGIN@28 which was called:
# once (6µs+0s) by Template::Plugins::_load at line 28 # spent 6µs making 1 call to Koha::Template::Plugin::AudioAlerts::BEGIN@28 | ||
| 29 | |||||
| 30 | sub AudioAlerts { | ||||
| 31 | my $dbh = C4::Context->dbh; | ||||
| 32 | my $audio_alerts = $dbh->selectall_arrayref( 'SELECT * FROM audio_alerts ORDER BY precedence', { Slice => {} } ); | ||||
| 33 | return encode_json($audio_alerts); | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | 1; |