The main package configuration file is located at /etc/Disaster/package.yml. Open the file, and replace it with the following contents:
general: description: Disaster relief coordination system access: public type: package category: uncategorized license: MIT acl: trunk: team branches: public releases: maintainers issues: public rfc: team pipeline: phpunit: strict phpstan: level: 0 fail_on_ignoreable: false phpcs: severity: 0 fail_on_warning: false config: max_locations: 10 max_projects: 50 donate_paypal_address: donate_bitcoin_address: menus: admin_settings: area: admin parent: settings position: after users alias: disaster name: Disaster Relief admin_disaster: area: admin position: after users type: parent icon: fa-fw fa-bricks alias: disaster name: Disaster Relief menus: locations: Locations projects: Projects hashes: project_status: in_progress: In Progress pending: Pending halted: Halted complete: Completed
Consists of general information regarding the package such as description, access level (public, commercial or private), license, any necessary prices, etc. The above simply states it's a package for disadaster relief coordination, is available to the public and open sourced under the MIT license. For full information on this section, please visit the Package Configuration - general page of the developer documentation.
Defines the write access levels of the various factions within the package including main / trunk branch, additional branches, releases, issues, RFCs, and so on. Each item can have a value of "maintainers", "team" or "public". Full information on this section can be found on the Package Configuration - acl page of the documentation.
The CI (continuous integration) pipeline parameters. This section defines what indicates a successful test run. Every time a commit is made to the repository, it will go through the CI pipeline as outlined within this section. Upon a successful test run, any pre-defined web hooks wil be called allowing for automated syncing of production environments, etc. Ful details can be found on the Sync to Production page of the documentation.
Simple array of key-value pairs that define the configuration variables for the package and their default values. Within the code, the configuration can be retrived and set with:
$address = $app->config('disaster.donate_paypal_address'); $app->setConfigVar('disaster.donate_paypal_address', 'email@example.com');
Full information about this section can be found on the Package Configuration - config page of the documentation.
Defines all menus included within the package. For the training system, this includes one "Disaster Relief" child menu within the Settings menu of the administration panel, plus another "Disaster Relief" parent menu under the users menu which includes two sub-menus. Full information on this section can be found within the Package Configuration - menus page of the documentation.
Sets of key-value pairs that are used throughout the software mainly to easily populate select, radio and checkbox lists. Full information can be found on the Package Configuration - hashes page of the documentation.
Once the new contents of the package.yml file are in place, you will need to scan the package to update the database accordingly. Run the following scan CLI command:
apex scan disaster
This will go through the package.yml configuration file, and update the database accordingly. Every time you modify the package.yml file, you must scan it into the system using the above command for it to take effect.