Rechercher une page de manuel
Jifty::Plugin::Quota::Model::Quota.3pm
Langue: en
Version: 2009-02-12 (ubuntu - 08/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Jifty::Plugin::Quota::Model::Quota - Quota modelDESCRIPTION
Generic quotas for Jifty model objects.create PARAMHASH
create_from_object OBJECT [PARAMHASH]
Conveniently creates a quota record using a model OBJECT and an optional extra paramhash.load_by_object OBJECT [PARAMHASH]
Conveniently loads a quota record using a model OBJECT and an optional extra paramhash.object
Returns the object regulated by this quota.usage_ok INTEGER
Checks if adding INTEGER to the current usage will exceed cap.Returns true or false.
add_usage INTEGER
Adds INTEGER to usage if there is enough quota left.Returns true on success, false on failure.
subtract_usage INTEGER
Subtracts INTEGER from usage.current_user_can
If current user can read the referenced object, then they can read the quotas. No one can created, update, or delete quotas unless they are a superuser.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre