Elgg  Version master
Static Public Member Functions | Static Protected Member Functions | List of all members
Elgg\Composer\PostInstall Class Reference

A composer command handler to run after composer install. More...

Static Public Member Functions

static execute (Event $event)
 Copies files that Elgg expects to be in the root directory. More...
 

Static Protected Member Functions

static copyFromElggToRoot (string $elggPath, string $rootPath, bool $overwrite=false)
 Copies a file from the given location in Elgg to the given location in root. More...
 
static createProjectModFolder ()
 Make sure the /mod folder exists in when Elgg is installed through a Composer project eg. More...
 
static symlinkPluginFromRootToElgg (string $plugin)
 Make it possible for composer-managed Elgg site to recognize plugins version-controlled in Elgg core. More...
 

Detailed Description

A composer command handler to run after composer install.

Definition at line 11 of file PostInstall.php.

Member Function Documentation

static Elgg\Composer\PostInstall::copyFromElggToRoot ( string  $elggPath,
string  $rootPath,
bool  $overwrite = false 
)
staticprotected

Copies a file from the given location in Elgg to the given location in root.

Parameters
string$elggPathPath relative to elgg dir.
string$rootPathPath relative to app root dir.
bool$overwriteOverwrite file if it exists in root path, defaults to false.
Returns
boolean Whether the copy succeeded.

Definition at line 46 of file PostInstall.php.

static Elgg\Composer\PostInstall::createProjectModFolder ( )
staticprotected

Make sure the /mod folder exists in when Elgg is installed through a Composer project eg.

starter project

Returns
bool
Since
4.2

Definition at line 64 of file PostInstall.php.

static Elgg\Composer\PostInstall::execute ( Event  $event)
static

Copies files that Elgg expects to be in the root directory.

Parameters
Event$eventThe Composer event (install/upgrade)
Returns
void

Definition at line 20 of file PostInstall.php.

static Elgg\Composer\PostInstall::symlinkPluginFromRootToElgg ( string  $plugin)
staticprotected

Make it possible for composer-managed Elgg site to recognize plugins version-controlled in Elgg core.

Parameters
string$pluginThe name of the plugin to symlink
Returns
bool Whether the symlink succeeded.

Definition at line 89 of file PostInstall.php.


The documentation for this class was generated from the following file: