Re: [Koha-devel] Koha::Object validation ?

2016-02-15 Thread Julian Maurice
I was thinking about calling $self->before_save() in Koha::Object::store
and then define Koha::AuthorisedValues::before_save, but that's kind of
the same thing. I'll go with overwriting the store method, thanks ;)

Le 15/02/2016 16:22, Jonathan Druart a écrit :
> Hi Julian,
> 
> You want to overwrite the store method, that's it?
> You can have a look at Koha::VirtualShelf->store for an example.
> 
> Jonathan
> 
> 2016-02-15 14:20 GMT+00:00 Julian Maurice :
>> Hi there,
>>
>> I'm currently working on some enhancements for authorised values (to
>> make it possible to have a hierarchy of values), so I'm using
>> Koha::AuthorisedValue which is a subclass of Koha::Object.
>>
>> I would like to add some sort of validation mechanism just before saving
>> the object into database.
>> Is there already someone who started to work (or started to think) on
>> something like that ?
>> Jonathan, maybe ?
>>
>> --
>> Julian Maurice 
>> BibLibre
>> ___
>> Koha-devel mailing list
>> Koha-devel@lists.koha-community.org
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : http://www.koha-community.org/
>> git : http://git.koha-community.org/
>> bugs : http://bugs.koha-community.org/
> ___
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
> 


-- 
Julian Maurice 
BibLibre
___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


Re: [Koha-devel] Koha::Object validation ?

2016-02-15 Thread Tomas Cohen Arazi
+1!

2016-02-15 12:22 GMT-03:00 Jonathan Druart <
jonathan.dru...@bugs.koha-community.org>:

> Hi Julian,
>
> You want to overwrite the store method, that's it?
> You can have a look at Koha::VirtualShelf->store for an example.
>
> Jonathan
>
> 2016-02-15 14:20 GMT+00:00 Julian Maurice :
> > Hi there,
> >
> > I'm currently working on some enhancements for authorised values (to
> > make it possible to have a hierarchy of values), so I'm using
> > Koha::AuthorisedValue which is a subclass of Koha::Object.
> >
> > I would like to add some sort of validation mechanism just before saving
> > the object into database.
> > Is there already someone who started to work (or started to think) on
> > something like that ?
> > Jonathan, maybe ?
> >
> > --
> > Julian Maurice 
> > BibLibre
> > ___
> > Koha-devel mailing list
> > Koha-devel@lists.koha-community.org
> > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> > website : http://www.koha-community.org/
> > git : http://git.koha-community.org/
> > bugs : http://bugs.koha-community.org/
> ___
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F
___
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/