Can you show some code where the save() is called ?

On Sat, Oct 3, 2009 at 7:55 PM, [email protected] <
[email protected]> wrote:

>
> save section is ok, but this triger beforeSave don't execute and dont
> return any value, only working trigers are in >LikecontentAppModel
> whats going one ?
> <?php
> class LikecontentSection extends LikecontentAppModel {
>        public $validate = array(
>                'title' => array('notempty'),
>                'text' => array('notempty')
>        );
>        //The Associations below have been created with all possible keys,
> those that are not needed can be removed
>        public $hasMany = array('Likecontent.LikecontentContent');
>
>        public function beforeSave(){
>                echo 'dupa';
>                exit;
>                if(empty($this->data['LikecontentSection']['text']) ||
> empty($this-
> >data['LikecontentSection']['url']) || $this->data
> ['LikecontentSection']['subpage'] == 0){
>                                $this->data['LikecontentSection']['text'] =
> '';
>                                $this->data['LikecontentSection']['url'] =
> '';
>                }
>                return true;
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to