PHP code example of vandres / craft-matrix-extended

1. Go to this page and download the library: Download vandres/craft-matrix-extended library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vandres / craft-matrix-extended example snippets


return [
    'enableDuplicate' => true,
    'enableCopyPaste' => true,
    'enableAddBlockAbove' => true,
    'extraDeleteButton' => false,
    'removeEntryTypesFromDiscloseMenu' => true,
    'experimentalFeatures' => true,
    'enableDragDrop' => false,
    'expandMenu' => true,
    'expandUngrouped' => false,
    'ungroupedPosition' => 'start', // start, end or hidden
    'fields' => [
        'dyncontent' => [ // matrix field handle
            'groups' => [
                [
                    'label' => \Craft::t('app', 'Simple'),
                    'types' => ['header', 'text'], // entry type handles
                ],
            ],
        ],
        'simplecontent' => [ // matrix field handle
            'oneLiner' => true, // prevent buttons from wrapping
            'groups' => [
                [
                    'label' => \Craft::t('app', 'Simple'),
                    'types' => ['header', 'text'], // entry type handles
                ],
            ],
        ]
    ]
];