private function handlePrePersist()
    {
        if (null !== $this->preFunction) {
            \call_user_func($this->preFunction, $this->environment, $this->model, $this->originalModel);
        }

        $this->dispatcher->dispatch(
            PrePersistModelEvent::NAME,
            new PrePersistModelEvent($this->environment, $this->model, $this->originalModel)
        );
    }
private function handlePrePersist()
    {
        if (null !== $this->preFunction) {
            \call_user_func($this->preFunction, $this->environment, $this->model, $this->originalModel);
        }

        $this->dispatcher->dispatch(
            PrePersistModelEvent::NAME,
            new PrePersistModelEvent($this->environment, $this->model, $this->originalModel)
        );
    }
private function handlePrePersist ( ) { if ( null !== $ this -> preFunction ) { \ call_user_func ( $ this -> preFunction , $ this -> environment , $ this -> model , $ this -> originalModel ) ; } $ this -> dispatcher -> dispatch ( PrePersistModelEvent :: NAME , new PrePersistModelEvent ( $ this -> environment , $ this -> model , $ this -> originalModel ) ) ; }
Trigger the pre persist event and handle the prePersist function if available.

@return void
Trigger the pre persist event and handle the prePersist function if available .