Since: concrete5 8.5.0a2

class ClonerOptions (View source)

A class representing the options for the page/collection/version Cloner.

Properties

protected User $currentUser

The currently logged in user.

private bool $keepOriginalAuthor

Should the original author be kept?

private bool $forceUnapproved

Mark the copied data as not approved?

private bool $copyAttributes

Should the collection version attributes be copied?

private bool $copyPageTypeComposerOutputBlocks

Should the page type composer output block records be copied?

private bool $copyCustomStyles

Should the custom theme styles be copied?

private bool $copyContents

Should the collection version contents (blocks/areas/...) be copied?

private string $versionComments

The version comments (if empty string, automatically build them).

Methods

__construct(User $currentUser)

Initialize the instance.

getCurrentUser()

Get the currently logged in user.

bool
keepOriginalAuthor()

Should the original author be kept?

$this
setKeepOriginalAuthor(bool $value)

Should the original author be kept?

bool
forceUnapproved()

Mark the copied data as not approved?

$this
setForceUnapproved(bool $value)

Mark the copied data as not approved?

bool
copyAttributes()

Should the collection version attributes be copied?

$this
setCopyAttributes(bool $value)

Should the collection version attributes be copied?

bool
copyPageTypeComposerOutputBlocks()

Should the page type composer output block records be copied?

setCopyPageTypeComposerOutputBlocks(bool $copyPageTypeComposerOutputBlocks)

Should the page type composer output block records be copied?

bool
copyCustomStyles()

Should the custom theme styles be copied?

$this
setCopyCustomStyles(bool $value)

Should the custom theme styles be copied?

bool
copyContents()

Should the collection version contents (blocks/areas/...) be copied?

$this
setCopyContents(bool $value)

Should the collection version contents (blocks/areas/...) be copied?

getVersionComments()

Get the version comments (if empty string, automatically build it).

$this
setVersionComments(string|object $value)

Set the version comments (if empty string, automatically build it).

Details

__construct(User $currentUser)

Initialize the instance.

Parameters

User $currentUser

the currently logged in user

User getCurrentUser()

Get the currently logged in user.

Return Value

User

bool keepOriginalAuthor()

Should the original author be kept?

Return Value

bool

$this setKeepOriginalAuthor(bool $value)

Should the original author be kept?

Parameters

bool $value

Return Value

$this

bool forceUnapproved()

Mark the copied data as not approved?

Return Value

bool

$this setForceUnapproved(bool $value)

Mark the copied data as not approved?

Parameters

bool $value

Return Value

$this

bool copyAttributes()

Should the collection version attributes be copied?

Return Value

bool

$this setCopyAttributes(bool $value)

Should the collection version attributes be copied?

Parameters

bool $value

Return Value

$this

bool copyPageTypeComposerOutputBlocks()

Should the page type composer output block records be copied?

Return Value

bool

setCopyPageTypeComposerOutputBlocks(bool $copyPageTypeComposerOutputBlocks)

Should the page type composer output block records be copied?

Parameters

bool $copyPageTypeComposerOutputBlocks

bool copyCustomStyles()

Should the custom theme styles be copied?

Return Value

bool

$this setCopyCustomStyles(bool $value)

Should the custom theme styles be copied?

Parameters

bool $value

Return Value

$this

bool copyContents()

Should the collection version contents (blocks/areas/...) be copied?

Return Value

bool

$this setCopyContents(bool $value)

Should the collection version contents (blocks/areas/...) be copied?

Parameters

bool $value

Return Value

$this

getVersionComments()

Get the version comments (if empty string, automatically build it).

$this setVersionComments(string|object $value)

Set the version comments (if empty string, automatically build it).

Parameters

string|object $value

a string value, or an object implementing the __toString() method

Return Value

$this