src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/PasteAllHandler.php
protected function addDispatchDuplicateModel(EnvironmentInterface $environment)
    {
        $environment->getEventDispatcher()->addListener(
            PostDuplicateModelEvent::NAME,
            function (PostDuplicateModelEvent $event) {
                $this->copiedModel   = $event->getModel();
                $this->originalModel = $event->getSourceModel();
            }
        );
    }
protected function addDispatchDuplicateModel(EnvironmentInterface $environment)
    {
        $environment->getEventDispatcher()->addListener(
            PostDuplicateModelEvent::NAME,
            function (PostDuplicateModelEvent $event) {
                $this->copiedModel   = $event->getModel();
                $this->originalModel = $event->getSourceModel();
            }
        );
    }
protected function addDispatchDuplicateModel ( EnvironmentInterface $ environment ) { $ environment -> getEventDispatcher ( ) -> addListener ( PostDuplicateModelEvent :: NAME , function ( PostDuplicateModelEvent $ event ) { $ this -> copiedModel = $ event -> getModel ( ) ; $ this -> originalModel = $ event -> getSourceModel ( ) ; } ) ; }
Add the event to the listeners for post duplicate model event.

@param EnvironmentInterface $environment The environment.

@return void
Add the event to the listeners for post duplicate model event .