-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.php
26 lines (20 loc) · 970 Bytes
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/** @var rex_addon $this */
// add success message after add-on install
$this->setProperty('successmsg', rex_i18n::rawMsg('demo_community_success_message', '<a href="' . rex_url::backendPage('demo_community') . '">' . $this->i18n('demo_community_title') . '</a>'));
// copy backup files
rex_dir::copy(
$this->getPath('backups'),
rex_addon::get('backup')->getDataPath()
);
// update config
// merge current config with additional config
// Background information:
// We need the demo to be installed first of all to fetch required packages and import data.
// To make this happen, we need to keep the config free of external dependencies and use an
// additional config which will be merged into the config when the demo is installed.
$config = array_replace_recursive(
rex_file::getConfig($this->getPath('package.yml')),
rex_file::getConfig($this->getPath('package.setup.yml'))
);
rex_file::putConfig($this->getPath('package.yml'), $config);