Configuration
Open the configuration file for your current environment: etc/config.{MW_ENVIRONMENT}.php
Database
To interact with a database, you need to configure your database connection:
<?php
$config = [
/* ... */
'default' => [
Core_Model::TYPE => [
'database' => [
'db_host' => '',
'db_username' => '',
'db_password' => '',
'db_database' => '',
'db_charset' => 'utf8mb4',
'lc_time_names' => 'en_US',
],
],
],
/* ... */
]
This provides the connection information to the Core_Model_Database
class, for all packages.
Forms
To manage forms and send emails, you can configure the contact settings.
<?php
$config = [
/* ... */
'default' => [
Core_Model::TYPE => [
'form' => [
'_mail_from_name' => 'MageWork',
'_mail_from_email' => 'hello@example.com',
'_mail_enabled' => true,
],
],
],
/* ... */
]
This provides the contact information to the Core_Model_Form
class.