Cloner
class Cloner (View source)
A class to copy pages and page versions.
Properties
protected Connection | $connection | ||
protected EntityManagerInterface | $entityManager | ||
protected Service | $siteService | ||
protected Date | $dateHelper | ||
protected EventDispatcher | $eventDispatcher |
Methods
No description
Duplicate a page and return the newly created page.
Create a clone of a collection, and all its versions, contents and attributes.
Create a copy of a collection version to another collection.
Create an alias of a block to another collection.
Get the name of a page that's unique for the parent.
Get the handle of a page that's unique for the parent.
Copy the data from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
Copy the attributes from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
Copy the page type composer block output records from one version to another.
Copy the custom theme styles from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
Copy the blocks from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
Copy the area styles from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
No description
Details
__construct(EntityManagerInterface $entityManager, Service $siteService, Date $dateHelper, EventDispatcher $eventDispatcher)
No description
Page|Stack
clonePage(Page $page, ClonerOptions $options, Page $newParentPage = null, TreeInterface $site = null)
Duplicate a page and return the newly created page.
Collection
cloneCollection(Collection $c, ClonerOptions $options)
Create a clone of a collection, and all its versions, contents and attributes.
Version
cloneCollectionVersion(Version $cvSource, Collection $cDestination, ClonerOptions $options)
Create a copy of a collection version to another collection.
bool
cloneBlock(Block $block, Collection $destinationCollection, int $displayOrder = null)
Create an alias of a block to another collection.
protected string
getUniquePageName(string $pageName, int $parentID)
Get the name of a page that's unique for the parent.
protected string
getUniquePageHandle(string $handle, int $parentID)
Get the handle of a page that's unique for the parent.
protected
copyData(ClonerOptions $options, array $cIDs, array $cvIDs = null)
Copy the data from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
protected
copyAttributes(array $cIDs, array $cvIDs = null)
Copy the attributes from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
protected
copyPageTypeComposerOutputBlocks(array $cIDs, array $cvIDs = null)
Copy the page type composer block output records from one version to another.
protected
copyCustomStyles(array $cIDs, array $cvIDs = null)
Copy the custom theme styles from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
protected
copyBlocks(int[] $cIDs, array $cvIDs = null, array $bIDs = null, int|null $newBlockDisplayOrder = null)
Copy the blocks from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
protected
copyAreaStyles(array $cIDs, array $cvIDs = null)
Copy the area styles from one collection version (or all versions of a collection) to another collection version (or all versions of a collection).
private
directCopy(string $table, string|string[] $copyFields, array $keyFields, string|null $from = null)
No description