Saturday, October 3, 2009

cakephp don't execute model trigger plugin's

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: