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 $copyFeatureAssignments Should the feature assignments be copied?
private bool $copyCustomStyles Should the custom theme styles be copied?
private bool $copyContents Should the collection version contents (blocks/areas/.
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
copyFeatureAssignments()

Should the feature assignments be copied?

$this
setCopyFeatureAssignments(bool $value)

Should the feature assignments 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/.

$this
setCopyContents(bool $value)

Should the collection version contents (blocks/areas/.

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

Should the feature assignments be copied?

Return Value

bool

$this setCopyFeatureAssignments(bool $value)

Should the feature assignments be copied?

Parameters

bool $value

Return Value

$this

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