https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17499
--- Comment #41 from Josef Moravec <[email protected]> --- Created attachment 64041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64041&action=edit [SIGNED-OFF] Bug 17499: Improve object usability by enabling direct access to transport preferences Since messaging preference is a feature that has multiple related database tables, usage via Koha-objects is sometimes frustrating. This patch adds a feature for Koha::Patron::Message::Preference which enables access to message transport preferences directly via this object. It allows us to skip calls to Koha::Patron::Message::Transport::Preference(s) because we can now get and set via K::P::M::Preference. Get: $preference->message_transport_types Returns a hashref, where each key is stored transport type and value for the key is letter code for the transport. Set: $preference->set({ message_transport_types => ['sms'] }) or $preference->message_transport_types('email', 'sms') or $preference->message_transport_types(['email', 'sms']) Returns $self (Koha::Patron::Message::Preference object) To test: 1. Run t/db_dependent/Koha/Patron/Message/Preferences.t Signed-off-by: Marc Véron <[email protected]> Signed-off-by: Josef Moravec <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
