20 public static function execute(Event $event) {
21 self::copyFromElggToRoot(
'install/config/htaccess.dist',
'.htaccess');
22 self::copyFromElggToRoot(
'index.php',
'index.php');
23 self::copyFromElggToRoot(
'install.php',
'install.php');
24 self::copyFromElggToRoot(
'upgrade.php',
'upgrade.php');
26 self::createProjectModFolder();
28 if (stripos(PHP_OS,
'win') !== 0) {
30 $managed_plugins = \Elgg\Database\Plugins::BUNDLED_PLUGINS;
31 foreach ($managed_plugins as
$plugin) {
32 self::symlinkPluginFromRootToElgg($plugin);
50 if (!$overwrite && file_exists($to)) {
54 return copy($from, $to);
68 if ($project_mod === $elgg_mod) {
73 if (is_dir($project_mod)) {
78 return mkdir($project_mod, 0755);
static projectRoot()
Get the root composer install directory.
if(!$item instanceof ElggEntity) $link
static elggRoot()
Get the Elgg root directory.
static symlinkPluginFromRootToElgg($plugin)
Make it possible for composer-managed Elgg site to recognize plugins version-controlled in Elgg core...
A composer command handler to run after composer install.
and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a copy
static createProjectModFolder()
Make sure the /mod folder exists in when Elgg is installed through a Composer project eg...
static execute(Event $event)
Copies files that Elgg expects to be in the root directory.
static copyFromElggToRoot($elggPath, $rootPath, $overwrite=false)
Copies a file from the given location in Elgg to the given location in root.