Drupal investigation

console.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. $params = require(__DIR__ . '/params.php');
  3. $db = require(__DIR__ . '/db.php');
  4. $config = [
  5. 'id' => 'basic-console',
  6. 'basePath' => dirname(__DIR__),
  7. 'bootstrap' => ['log'],
  8. 'controllerNamespace' => 'app\commands',
  9. 'components' => [
  10. 'cache' => [
  11. 'class' => 'yii\caching\FileCache',
  12. ],
  13. 'log' => [
  14. 'targets' => [
  15. [
  16. 'class' => 'yii\log\FileTarget',
  17. 'levels' => ['error', 'warning'],
  18. ],
  19. ],
  20. ],
  21. 'db' => $db,
  22. 'authManager' => [
  23. 'class' => 'yii\rbac\DbManager',
  24. ],
  25. ],
  26. 'params' => $params,
  27. /*
  28. 'controllerMap' => [
  29. 'fixture' => [ // Fixture generation command line.
  30. 'class' => 'yii\faker\FixtureController',
  31. ],
  32. ],
  33. */
  34. ];
  35. if (YII_ENV_DEV) {
  36. // configuration adjustments for 'dev' environment
  37. $config['bootstrap'][] = 'gii';
  38. $config['modules']['gii'] = [
  39. 'class' => 'yii\gii\Module',
  40. ];
  41. }
  42. return $config;