PHP code example of fklavyenet / craft-webblocks

1. Go to this page and download the library: Download fklavyenet/craft-webblocks 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/ */

    

fklavyenet / craft-webblocks example snippets


return [
    'from'    => 1,
    'to'      => 2,
    'actions' => [
        ['type' => 'updateFieldSettings', 'handle' => 'wbTitle', 'settings' => ['instructions' => '...']],
        ['type' => 'deprecateField',      'handle' => 'wbOldField'],
        ['type' => 'addField',            'handle' => 'wbNewField', 'definition' => 'fields/wbNewField.json'],
    ],
];
bash
# DDEV
ddev craft webblocks/seed --interactive=0

# Plain server
php craft webblocks/seed --interactive=0
bash
php craft webblocks/seed --languages=en,tr
bash
php craft webblocks/components/cleanup-deprecated          # list pending
php craft webblocks/components/cleanup-deprecated --force  # purge all