src/Model/Page.php
public function prePersist()
    {
        $this->createdAt = $this->updatedAt = new \DateTime('now');

        if (!$this->metaTitle) {
            $this->setMetaTitle($this->pageName);
        }
    }
public function prePersist()
    {
        $this->createdAt = $this->updatedAt = new \DateTime('now');

        if (!$this->metaTitle) {
            $this->setMetaTitle($this->pageName);
        }
    }
public function prePersist ( ) { $ this -> createdAt = $ this -> updatedAt = new \ DateTime ( 'now' ) ; if ( ! $ this -> metaTitle ) { $ this -> setMetaTitle ( $ this -> pageName ) ; } }
Hook on to pre-persist action.
Hook on to pre - persist action .