Properties for configuration files - dwwe2017/php-orm-react-framework GitHub Wiki

Global Configuration Override

You can use configuration files for overriding configuration values from modules, etc.

You can divide the configuration into any number of files, the only important thing is that these are always PHP files that are in the config directory, file names are also irrelevant.

You would place values in here that are agnostic to the environment and not sensitive to security.

General properties

$config = [
   //Debug mode
    "debug_mode" => true,
    //Preset language
    "language" => "en_US",
    //Entry module for page view without parameters
    "entry_module" => "Dashboard",
    //Database configuration
    "connection_options" => [],
    //Doctrine configuration
    "doctrine_options" => [],
    //Template configuration
    "template_options" => [],
    //Logger configuration
    "logger_options" => [],
    //PhpFastCache configuration
    "cache_options" => [
        "driver" => [
            "driverName" => "files"
        ]
    ]
];

Portal properties

Portal properties can also be accessed in the template, where the first letter of the respective variable stands for the type. The property b_allow_stay_logged_in has the initial letter b, which means boolean.

To access the variable with Twig just use {{ b_allow_stay_logged_in }} in the respective template file.

$config = [
    "portal_options" => [
        //CoreUI or CoreUI Pro
        "b_core_ui_pro" => false,
        //Default or dark layout
        "b_dark_layout" => false,
        //Sidebar folded in by default
        "b_sidebar_unfoldable" => false,
        //Any visitor can register themselves
        "b_allow_registration" => false,
        //When logging in, users can select the option to remain permanently logged on
        "b_allow_stay_logged_in" => true,
        //Array of Js files that should not be minimized and permanently integrated
        "a_non_minified_js" => [
            "assets/vendors/pace-progress/js/pace.min.js",
            "assets/vendors/@coreui/coreui/js/coreui.bundle.min.js"
        ],
        //Array of CSS files that should not be minimized and permanently integrated
        "a_non_minified_css" => [
            "assets/vendors/@coreui/coreui/css/coreui.min.css",
            "assets/vendors/pace-progress/css/pace.min.css",
            "assets/vendors/@coreui/icons/css/free.min.css"
        ],
    ]
];