Skip to content

Example setup for content migrations? #142

Closed Answered by jrrdnx
jrrdnx asked this question in Q&A
Discussion options

You must be logged in to vote

Played around with this for quite a while and finally got it working with this format:

$fieldLinks = new HyperField([
    'groupId' => null,
    'name' => 'Links',
    'handle' => 'fieldLinks',
    'instructions' => '',
    'required' => false,
    'defaultLinkType' => 'default-'.StringHelper::toKebabCase(Entry::class),
    'multipleLinks' => true,
    'newWindow' => true,
    'linkTypes' => [
        [
            'type' => Asset::class,
            'enabled' => true,
            'label' => Asset::classDisplayName(),
            'handle' => 'default-'.StringHelper::toKebabCase(Asset::class),
            'sources' => [
                'volume:'.$volumeMedia->uid
            ],
        ],
…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@engram-design
Comment options

Answer selected by jrrdnx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants