concrete/src/Page/Sitemap/DragRequestData.php
protected function whyCantCopyVersion()
    {
        $originalPage = $this->getSingleOriginalPage();
        if ($originalPage === null) {
            return t("It's possible to copy just one page version at a time.");
        }
        if ($originalPage->isExternalLink()) {
            return t("It's not possible to copy the page version of an external URL.");
        }
        if ($originalPage->isAliasPage()) {
            return t("It's not possible to copy the page version of aliases.");
        }
        $destinationPage = $this->getDestinationPage();
        if ($destinationPage->getCollectionID() == $originalPage->getCollectionID()) {
            return t("It's not possible to copy the page version of a page to the page itself.");
        }
        $pc = new Checker($destinationPage);
        if (!$pc->canWrite()) {
            return t('You don\'t have the permission to edit the contents of "%s".', $destinationPage->getCollectionName());
        }

        return '';
    }
protected function whyCantCopyVersion()
    {
        $originalPage = $this->getSingleOriginalPage();
        if ($originalPage === null) {
            return t("It's possible to copy just one page version at a time.");
        }
        if ($originalPage->isExternalLink()) {
            return t("It's not possible to copy the page version of an external URL.");
        }
        if ($originalPage->isAliasPage()) {
            return t("It's not possible to copy the page version of aliases.");
        }
        $destinationPage = $this->getDestinationPage();
        if ($destinationPage->getCollectionID() == $originalPage->getCollectionID()) {
            return t("It's not possible to copy the page version of a page to the page itself.");
        }
        $pc = new Checker($destinationPage);
        if (!$pc->canWrite()) {
            return t('You don\'t have the permission to edit the contents of "%s".', $destinationPage->getCollectionName());
        }

        return '';
    }
protected function whyCantCopyVersion ( ) { $ originalPage = $ this -> getSingleOriginalPage ( ) ; if ( $ originalPage === null ) { return t ( "It's possible to copy just one page version at a time." ) ; } if ( $ originalPage -> isExternalLink ( ) ) { return t ( "It's not possible to copy the page version of an external URL." ) ; } if ( $ originalPage -> isAliasPage ( ) ) { return t ( "It's not possible to copy the page version of aliases." ) ; } $ destinationPage = $ this -> getDestinationPage ( ) ; if ( $ destinationPage -> getCollectionID ( ) == $ originalPage -> getCollectionID ( ) ) { return t ( "It's not possible to copy the page version of a page to the page itself." ) ; } $ pc = new Checker ( $ destinationPage ) ; if ( ! $ pc -> canWrite ( ) ) { return t ( 'You don\'t have the permission to edit the contents of "%s".' , $ destinationPage -> getCollectionName ( ) ) ; } return '' ; }
Get the reason why the copy-version operation can't be performed.

@return string empty string if the operation CAN be performed
Get the reason why the copy - version operation can t be performed .