Model/Review.php
public function beforeSave()
    {
        parent::beforeSave();
        if ($this->isObjectNew() && !$this->getCreatedAt()) {
            $this->setCreatedAt($this->dateTime->formatDate(true));
        }
        $this->setUpdatedAt($this->dateTime->formatDate(true));

        return $this;
    }
public function beforeSave()
    {
        parent::beforeSave();
        if ($this->isObjectNew() && !$this->getCreatedAt()) {
            $this->setCreatedAt($this->dateTime->formatDate(true));
        }
        $this->setUpdatedAt($this->dateTime->formatDate(true));

        return $this;
    }
public function beforeSave ( ) { parent :: beforeSave ( ) ; if ( $ this -> isObjectNew ( ) && ! $ this -> getCreatedAt ( ) ) { $ this -> setCreatedAt ( $ this -> dateTime -> formatDate ( true ) ) ; } $ this -> setUpdatedAt ( $ this -> dateTime -> formatDate ( true ) ) ; return $ this ; }
Prepare data to be saved to database.

@return $this
Prepare data to be saved to database .