extraBeforeSave() public static method

public static extraBeforeSave ( $type = 'update', $object )
示例#1
0
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         if ($this->isNewRecord) {
             $this->object_type = 'product';
             Object::extraBeforeSave('create', $this);
         } else {
             Object::extraBeforeSave('update', $this);
         }
         return true;
     } else {
         return false;
     }
 }