class DragRequestData (View source)

Constants

OPERATION_MOVE

Drag operation: move page(s).

OPERATION_ALIAS

Drag operation: alias page(s).

OPERATION_COPY

Drag operation: copy page(s).

OPERATION_COPYALL

Drag operation: copy page(s) and their sub-pages.

OPERATION_COPYVERSION

Drag operation: copy most recent version of a page to another page.

Properties

protected Application $app
protected Request $request
protected string $dragMode
protected Page $destinationPage
protected Page|null $destinationSibling
protected Page[] $originalPages
protected bool|null $isSomeOriginalPageWithChildren
protected bool|null $isSomeOriginalPageAnAlias
protected bool|null $isSaveOldPagePath
protected bool|null $isCopyChildrenOnly
protected array $operationErrors Array keys are the OPERATION_.

Methods

__construct(Application $app, Request $request)

No description

string
getDragMode()

No description

getDestinationPage()

No description

Page|null
getDestinationSibling()

No description

Page[]
getOriginalPages()

No description

Page|null
getSingleOriginalPage()

Get a Page instance if and only if there's just one original page.

bool
isSaveOldPagePath()

No description

bool
isCopyChildrenOnly()

No description

bool
canDo(string $operation)

Check if an operation can be performed.

bool
canDoAnyOf(array $operations)

Check if at least one operation can be performed.

string
whyCantDo(string $operation)

Get the reason why an operation can't be performed.

bool
bool
isSomeOriginalPageAnAlias()

No description

initializeDragMode()

No description

initializeDestinationPages()

No description

initializeOriginalPages()

No description

string
whyCantMove()

Get the reason why the move operation can't be performed.

string
whyCantAlias()

Get the reason why the alias operation can't be performed.

string
whyCantCopy()

Get the reason why the copy operation can't be performed.

string
whyCantCopyAll()

Get the reason why the copy-all operation can't be performed (NOTE: this DOES NOT include the checks performed in the whyCantCopy() method).

string
whyCantCopyVersion()

Get the reason why the copy-version operation can't be performed.

Details

__construct(Application $app, Request $request)

Parameters

Application $app
Request $request

Exceptions

UserMessageException

string getDragMode()

Return Value

string

Page getDestinationPage()

Return Value

Page

Page|null getDestinationSibling()

Return Value

Page|null

Page[] getOriginalPages()

Return Value

Page[]

Page|null getSingleOriginalPage()

Get a Page instance if and only if there's just one original page.

Return Value

Page|null

bool isSaveOldPagePath()

Return Value

bool

bool isCopyChildrenOnly()

Return Value

bool

bool canDo(string $operation)

Check if an operation can be performed.

Parameters

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

Return Value

bool

bool canDoAnyOf(array $operations)

Check if at least one operation can be performed.

Parameters

array $operations The values of one of the OPERATION_... constants

Return Value

bool

string whyCantDo(string $operation)

Get the reason why an operation can't be performed.

Parameters

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

Return Value

string empty string if the operation CAN be performed

protected bool isSomeOriginalPageWithChildren()

Return Value

bool

protected bool isSomeOriginalPageAnAlias()

Return Value

bool

protected initializeDragMode()

protected initializeDestinationPages()

protected initializeOriginalPages()

protected string whyCantMove()

Get the reason why the move operation can't be performed.

Return Value

string empty string if the operation CAN be performed

protected string whyCantAlias()

Get the reason why the alias operation can't be performed.

Return Value

string empty string if the operation CAN be performed

protected string whyCantCopy()

Get the reason why the copy operation can't be performed.

Return Value

string empty string if the operation CAN be performed

protected string whyCantCopyAll()

Get the reason why the copy-all operation can't be performed (NOTE: this DOES NOT include the checks performed in the whyCantCopy() method).

Return Value

string empty string if the operation CAN be performed

protected string whyCantCopyVersion()

Get the reason why the copy-version operation can't be performed.

Return Value

string empty string if the operation CAN be performed