src/Contao/View/Contao2BackendView/EditMask.php
protected function handlePrePersist()
    {
        $environment = $this->getEnvironment();
        if (null !== $this->preFunction) {
            \call_user_func($this->preFunction, $environment, $this->model, $this->originalModel);
        }

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

        $environment->getEventDispatcher()->dispatch(
            PrePersistModelEvent::NAME,
            new PrePersistModelEvent($environment, $this->model, $this->originalModel)
        );
    }
protected function handlePrePersist ( ) { $ environment = $ this -> getEnvironment ( ) ; if ( null !== $ this -> preFunction ) { \ call_user_func ( $ this -> preFunction , $ environment , $ this -> model , $ this -> originalModel ) ; } $ environment -> getEventDispatcher ( ) -> dispatch ( PrePersistModelEvent :: NAME , new PrePersistModelEvent ( $ 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 .