concrete/src/Page/Sitemap/DragRequestData.php
protected function whyCantAlias()
    {
        if ($this->isSomeOriginalPageAnAlias()) {
            return t('It\'s not possible to create aliases of aliases.');
        }
        $destinationPageChecker = new Checker($this->getDestinationPage());
        foreach ($this->getOriginalPages() as $originalPage) {
            $originalPageChecker = new Checker($originalPage);
            if (!$originalPageChecker->canMoveOrCopyPage()) {
                return t('You don\'t have the permission to create an alias of the page "%s".', $originalPage->getCollectionName());
            }
            $originalPageType = $originalPage->getPageTypeObject();
            if (!$destinationPageChecker->canAddSubpage($originalPageType)) {
                return t('You do not have sufficient privileges to alias the page "%1$s" under "%2$s".', $originalPage->getCollectionName(), $this->getDestinationPage()->getCollectionName());
            }
        }

        return '';
    }
protected function whyCantAlias()
    {
        if ($this->isSomeOriginalPageAnAlias()) {
            return t('It\'s not possible to create aliases of aliases.');
        }
        $destinationPageChecker = new Checker($this->getDestinationPage());
        foreach ($this->getOriginalPages() as $originalPage) {
            $originalPageChecker = new Checker($originalPage);
            if (!$originalPageChecker->canMoveOrCopyPage()) {
                return t('You don\'t have the permission to create an alias of the page "%s".', $originalPage->getCollectionName());
            }
            $originalPageType = $originalPage->getPageTypeObject();
            if (!$destinationPageChecker->canAddSubpage($originalPageType)) {
                return t('You do not have sufficient privileges to alias the page "%1$s" under "%2$s".', $originalPage->getCollectionName(), $this->getDestinationPage()->getCollectionName());
            }
        }

        return '';
    }
protected function whyCantAlias ( ) { if ( $ this -> isSomeOriginalPageAnAlias ( ) ) { return t ( 'It\'s not possible to create aliases of aliases.' ) ; } $ destinationPageChecker = new Checker ( $ this -> getDestinationPage ( ) ) ; foreach ( $ this -> getOriginalPages ( ) as $ originalPage ) { $ originalPageChecker = new Checker ( $ originalPage ) ; if ( ! $ originalPageChecker -> canMoveOrCopyPage ( ) ) { return t ( 'You don\'t have the permission to create an alias of the page "%s".' , $ originalPage -> getCollectionName ( ) ) ; } $ originalPageType = $ originalPage -> getPageTypeObject ( ) ; if ( ! $ destinationPageChecker -> canAddSubpage ( $ originalPageType ) ) { return t ( 'You do not have sufficient privileges to alias the page "%1$s" under "%2$s".' , $ originalPage -> getCollectionName ( ) , $ this -> getDestinationPage ( ) -> getCollectionName ( ) ) ; } } return '' ; }
Get the reason why the alias operation can't be performed.

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