src/Controller/DefaultController.php
private function processPasteTopAfterModel(CollectionInterface $models, ModelIdInterface $parent = null)
    {
        if ($parent && $models->count()) {
            $manualSorting = ViewHelpers::getManualSortingProperty($this->getEnvironment());

            if ($manualSorting) {
                $this->pasteTop($models, $manualSorting, $parent);

                return;
            }

            $dataProvider = $this->getEnvironment()->getDataProvider();
            $dataProvider->saveEach($models);

            $this->triggerPostPasteModel($models);
            $this->clearModelCollection($models);
        }
    }
private function processPasteTopAfterModel(CollectionInterface $models, ModelIdInterface $parent = null)
    {
        if ($parent && $models->count()) {
            $manualSorting = ViewHelpers::getManualSortingProperty($this->getEnvironment());

            if ($manualSorting) {
                $this->pasteTop($models, $manualSorting, $parent);

                return;
            }

            $dataProvider = $this->getEnvironment()->getDataProvider();
            $dataProvider->saveEach($models);

            $this->triggerPostPasteModel($models);
            $this->clearModelCollection($models);
        }
    }
private function processPasteTopAfterModel ( CollectionInterface $ models , ModelIdInterface $ parent = null ) { if ( $ parent && $ models -> count ( ) ) { $ manualSorting = ViewHelpers :: getManualSortingProperty ( $ this -> getEnvironment ( ) ) ; if ( $ manualSorting ) { $ this -> pasteTop ( $ models , $ manualSorting , $ parent ) ; return ; } $ dataProvider = $ this -> getEnvironment ( ) -> getDataProvider ( ) ; $ dataProvider -> saveEach ( $ models ) ; $ this -> triggerPostPasteModel ( $ models ) ; $ this -> clearModelCollection ( $ models ) ; } }
Process paste the content of the clipboard onto the top after a model.

@param CollectionInterface $models The collection of models.
@param ModelIdInterface    $parent The parent model id.

@return void
Process paste the content of the clipboard onto the top after a model .