Jump to content

Modules configuration as Code


spoetnik
 Share

Recommended Posts

Doubting if this is the correct topic for this question, but here we go...

 

Is it possible to have the Modules configuration in code? 
With RockMigrations it is possible to have your templates- and fieldsconfiguration in code. I am missing a way to have the configuration of the various modules in use in code.

Link to comment
Share on other sites

Of course RockMigrations can do that.

Example migrate.php:

<?php

namespace ProcessWire;

$rm = rockmigrations();

// install modules
$rm->installModule('TracyDebugger');
$rm->installModule('RockDevTools');
$rm->installModule('RockFrontend');
$rm->installModule('AdminThemeUikit', [
  'toggleBehavior' => 1, // consistent
  'themeName' => '', // original theme
]);
$rm->installModule('RockAdminTweaks', [
  'enabledTweaks' => [
    'General:QuickAdd',
    'Inputfields:CopyFieldNames',
    'Inputfields:ImageDownload',
    'PageList:TemplateLink',
    'PageEdit:PrevNextPage',
  ],
]);
$rm->installModule('Less', [
  'useCache' => 1,
]);

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...