Interface ClipboardInterface.

This interface describes the internal clipboard of DcGeneral. The implementing class will store the values persistent to the input provider stored in the environment.

 Methods

Clear the complete clipboard.

clear() : static

Returns

static

Set the clipboard to copy mode and copy the given ids.

copy(array|mixed $ids) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface
deprecated

Parameters

$ids

arraymixed

The id or ids to be copied.

Returns

Set the clipboard to create mode for a child of the given parent data set.

create(string $parentId) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface
deprecated

Parameters

$parentId

string

The id of the parent data set.

Returns

Set the clipboard to cut mode and cut the given ids.

cut(array|mixed $ids) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface
deprecated

Parameters

$ids

arraymixed

The id or ids to be cut.

Returns

Get all items from the clipboard.

fetch(\ContaoCommunityAlliance\DcGeneral\Clipboard\FilterInterface|null $filter) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface[]

Retrieve the ids ignored in the clipboard as they would create a circular reference when pasting.

getCircularIds() : array
deprecated

Returns

array

Retrieve the ids contained in the clipboard.

getContainedIds() : array
deprecated

Returns

array

Retrieve the current mode of the clipboard.

getMode() : string
deprecated

Returns

stringEither cut|paste|mode

Retrieve the id of the parent item (if any).

getParent() : null | string
This is only valid in create mode.
deprecated

Returns

nullstring

Determine if an item exist.

has(\ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface $item) : static

Parameters

Returns

static

Determine if an item for the model id exist.

hasId(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId) : static

Parameters

Returns

static

Determine if the content in the clipboard shall be copied.

isCopy() : bool
deprecated

Returns

bool

Determine if the content in the clipboard is a new item to be created.

isCreate() : bool
deprecated

Returns

bool

Determine if the content in the clipboard shall be cut.

isCut() : bool
deprecated

Returns

bool

Determine if the clipboard is empty.

isEmpty(\ContaoCommunityAlliance\DcGeneral\Clipboard\FilterInterface|null $filter) : bool

Parameters

Returns

bool

Determine if the clipboard is not empty.

isNotEmpty(\ContaoCommunityAlliance\DcGeneral\Clipboard\FilterInterface|null $filter) : bool

Parameters

Returns

bool

Load the content of the clipboard from the input provider stored in the environment.

loadFrom(\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $objEnvironment) : static

Parameters

$objEnvironment

\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface

The environment where the input provider will retrieve the values from.

Returns

static

Push an item to the clipboard.

push(\ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface $item) : static

Parameters

Returns

static

Remove an item from the clipboard.

remove(\ContaoCommunityAlliance\DcGeneral\Clipboard\ItemInterface $item) : static

Parameters

Returns

static

Remove an item from the clipboard.

removeById(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId) : static

Parameters

Returns

static

Save the content of the clipboard to the input provider stored in the environment.

saveTo(\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $objEnvironment) : static

Parameters

$objEnvironment

\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface

The environment where the input provider will store the values to.

Returns

static

Set the ids ignored in the clipboard as they would create a circular reference when pasting.

setCircularIds(array $arrIds) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface
deprecated

Parameters

$arrIds

array

The list of ids.

Returns

Set the ids contained in the clipboard.

setContainedIds(array $arrIds) : \ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface
deprecated

Parameters

$arrIds

array

The list of ids.

Returns

 Constants

 

Clipboard is in copy mode.

MODE_COPY 
deprecated
 

Clipboard is in create mode.

MODE_CREATE 
deprecated
 

Clipboard is in cut mode.

MODE_CUT 
deprecated