src/Controller/DefaultController.php
private function triggerPrePasteModel(CollectionInterface $collection)
    {
        foreach ($collection as $model) {
            $event = new PrePasteModelEvent($this->getEnvironment(), $model);
            $this->getEnvironment()->getEventDispatcher()->dispatch($event::NAME, $event);
        }
    }
private function triggerPrePasteModel(CollectionInterface $collection)
    {
        foreach ($collection as $model) {
            $event = new PrePasteModelEvent($this->getEnvironment(), $model);
            $this->getEnvironment()->getEventDispatcher()->dispatch($event::NAME, $event);
        }
    }
private function triggerPrePasteModel ( CollectionInterface $ collection ) { foreach ( $ collection as $ model ) { $ event = new PrePasteModelEvent ( $ this -> getEnvironment ( ) , $ model ) ; $ this -> getEnvironment ( ) -> getEventDispatcher ( ) -> dispatch ( $ event :: NAME , $ event ) ; } }
Trigger for each model the pre persist event.

@param CollectionInterface $collection The collection of models.

@return void
Trigger for each model the pre persist event .