CopyContent
    
            
            in package
            
        
    
    
    
Allows to copy content by sync options or by custom callback.
Table of Contents
Properties
Methods
- __construct() : mixed
- C'tor.
- copy() : mixed
- Copy content to a set of other languages. If you do not pass a callback the content will be copied from your sync options you passed via constructor.
- copyAll() : mixed
- The content will be copied from your sync options you passed via constructor.
- copyPost() : mixed
- The given post ID will be copied from your sync options you passed via constructor.
- copyTerm() : mixed
- The given term ID will be copied from your sync options you passed via constructor.
- fromPostType() : mixed
- Copy content from a given post type and sync options. Use this only inside your `copyContentTo` callback!
- fromSyncOptions() : mixed
- Copy the complete content from our sync options. Use this only inside your `copyContentTo` callback!
- fromTaxonomy() : mixed
- Copy content from a given taxonomy and sync options. Use this only inside your `copyContentTo` callback!
- getSync() : mixed
- Get `Sync` instance.
- compInstance() : mixed
- Get compatibility language instance.
Properties
$sync
Sync mechanism class.
    private
        Sync
    $sync
    
    
    
    
Methods
__construct()
C'tor.
    public
                    __construct(Sync $sync) : mixed
    Parameters
- $sync : Sync
Tags
copy()
Copy content to a set of other languages. If you do not pass a callback the content will be copied from your sync options you passed via constructor.
    public
                    copy(string $sourceLanguage, array<string|int, string> $destinationLanguages, callable $callback) : mixed
    Parameters
- $sourceLanguage : string
- $destinationLanguages : array<string|int, string>
- $callback : callable
- 
                    Your callback which starts copying in the correct language context 
copyAll()
The content will be copied from your sync options you passed via constructor.
    public
                    copyAll(string $sourceLanguage, array<string|int, string> $destinationLanguages) : mixed
    Parameters
- $sourceLanguage : string
- $destinationLanguages : array<string|int, string>
copyPost()
The given post ID will be copied from your sync options you passed via constructor.
    public
                    copyPost(int $id, string $sourceLanguage, string|array<string|int, string> $destinationLanguage) : mixed
    Parameters
- $id : int
- $sourceLanguage : string
- $destinationLanguage : string|array<string|int, string>
copyTerm()
The given term ID will be copied from your sync options you passed via constructor.
    public
                    copyTerm(int $id, string $sourceLanguage, string $destinationLanguage) : mixed
    Parameters
- $id : int
- $sourceLanguage : string
- $destinationLanguage : string
fromPostType()
Copy content from a given post type and sync options. Use this only inside your `copyContentTo` callback!
    public
                    fromPostType(string $post_type, array<string|int, mixed> $syncOptions[, array<string|int, int> $postIds = null ]) : mixed
    Parameters
- $post_type : string
- $syncOptions : array<string|int, mixed>
- $postIds : array<string|int, int> = null
fromSyncOptions()
Copy the complete content from our sync options. Use this only inside your `copyContentTo` callback!
    public
                    fromSyncOptions() : mixed
    fromTaxonomy()
Copy content from a given taxonomy and sync options. Use this only inside your `copyContentTo` callback!
    public
                    fromTaxonomy(string $taxonomy, array<string|int, mixed> $syncOptions[, array<string|int, int> $termIds = null ]) : mixed
    Parameters
- $taxonomy : string
- $syncOptions : array<string|int, mixed>
- $termIds : array<string|int, int> = null
getSync()
Get `Sync` instance.
    public
                    getSync() : mixed
    Tags
compInstance()
Get compatibility language instance.
    protected
                    compInstance() : mixed