PHP code example of dgrigg / craft-migration-assistant
1. Go to this page and download the library: Download dgrigg/craft-migration-assistant 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/ */
dgrigg / craft-migration-assistant example snippets
//Custom field example
Event::on(Fields::class, Fields::EVENT_BEFORE_EXPORT_ELEMENT, function(ExportEvent $event) {
$value = $event->value;
$value['settings']['special_setting'] = 'some special setting value';
$event->value = $value;
});