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_... constant values, array values are the reasons why the operation can't be performed (or empty string if they can be performed).

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)

No description

Parameters

Application $app
Request $request

Exceptions

UserMessageException

string getDragMode()

No description

Return Value

string

Page getDestinationPage()

No description

Return Value

Page

Page|null getDestinationSibling()

No description

Return Value

Page|null

Page[] getOriginalPages()

No description

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()

No description

Return Value

bool

bool isCopyChildrenOnly()

No description

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()

No description

Return Value

bool

protected bool isSomeOriginalPageAnAlias()

No description

Return Value

bool

protected initializeDragMode()

No description

protected initializeDestinationPages()

No description

protected initializeOriginalPages()

No description

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