concrete/src/Page/Sitemap/DragRequestData.php
public function whyCantDo($operation)
    {
        if (!is_string($operation)) {
            return 'Invalid $operation';
        }
        if (!isset($this->operationErrors[$operation])) {
            switch ($operation) {
                case static::OPERATION_MOVE:
                    $error = $this->whyCantMove();
                    break;
                case static::OPERATION_ALIAS:
                    $error = $this->whyCantAlias();
                    break;
                case static::OPERATION_COPY:
                    $error = $this->whyCantCopy();
                    break;
                case static::OPERATION_COPYALL:
                    $error = $this->whyCantDo(static::OPERATION_COPY);
                    if ($error === '') {
                        $error = $this->whyCantCopyAll();
                    }
                    break;
                case static::OPERATION_COPYVERSION:
                    $error = $this->whyCantCopyVersion();
                    break;
                default:
                    return 'Invalid $operation';
            }
            $this->operationErrors[$operation] = $error;
        }

        return $this->operationErrors[$operation];
    }
public function whyCantDo($operation)
    {
        if (!is_string($operation)) {
            return 'Invalid $operation';
        }
        if (!isset($this->operationErrors[$operation])) {
            switch ($operation) {
                case static::OPERATION_MOVE:
                    $error = $this->whyCantMove();
                    break;
                case static::OPERATION_ALIAS:
                    $error = $this->whyCantAlias();
                    break;
                case static::OPERATION_COPY:
                    $error = $this->whyCantCopy();
                    break;
                case static::OPERATION_COPYALL:
                    $error = $this->whyCantDo(static::OPERATION_COPY);
                    if ($error === '') {
                        $error = $this->whyCantCopyAll();
                    }
                    break;
                case static::OPERATION_COPYVERSION:
                    $error = $this->whyCantCopyVersion();
                    break;
                default:
                    return 'Invalid $operation';
            }
            $this->operationErrors[$operation] = $error;
        }

        return $this->operationErrors[$operation];
    }
public function whyCantDo ( $ operation ) { if ( ! is_string ( $ operation ) ) { return 'Invalid $operation' ; } if ( ! isset ( $ this -> operationErrors [ $ operation ] ) ) { switch ( $ operation ) { case static :: OPERATION_MOVE : $ error = $ this -> whyCantMove ( ) ; break ; case static :: OPERATION_ALIAS : $ error = $ this -> whyCantAlias ( ) ; break ; case static :: OPERATION_COPY : $ error = $ this -> whyCantCopy ( ) ; break ; case static :: OPERATION_COPYALL : $ error = $ this -> whyCantDo ( static :: OPERATION_COPY ) ; if ( $ error === '' ) { $ error = $ this -> whyCantCopyAll ( ) ; } break ; case static :: OPERATION_COPYVERSION : $ error = $ this -> whyCantCopyVersion ( ) ; break ; default : return 'Invalid $operation' ; } $ this -> operationErrors [ $ operation ] = $ error ; } return $ this -> operationErrors [ $ operation ] ; }
Get the reason why an operation can't be performed.

@param string $operation The value of one of the OPERATION_... constants.

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