Contao\DC_Folder::copyAll PHP Method

copyAll() public method

Move all selected files and folders
public copyAll ( )
    public function copyAll()
    {
        if ($GLOBALS['TL_DCA'][$this->strTable]['config']['notCopyable']) {
            throw new InternalServerErrorException('Table "' . $this->strTable . '" is not copyable.');
        }
        // PID is mandatory
        if (!strlen(\Input::get('pid', true))) {
            $this->redirect($this->getReferer());
        }
        /** @var SessionInterface $objSession */
        $objSession = \System::getContainer()->get('session');
        $arrClipboard = $objSession->get('CLIPBOARD');
        if (isset($arrClipboard[$this->strTable]) && is_array($arrClipboard[$this->strTable]['id'])) {
            foreach ($arrClipboard[$this->strTable]['id'] as $id) {
                $this->copy($id);
                // do not urldecode() here (see #6840)
            }
        }
        $this->redirect($this->getReferer());
    }