private static symlinkPluginFromRootToElgg ( string $plugin ) : boolean | ||
$plugin | string | The name of the plugin to symlink |
return | boolean | Whether the symlink succeeded. |
private static function symlinkPluginFromRootToElgg($plugin)
{
$from = Directory\Local::root()->getPath("mod/{$plugin}");
$to = Elgg\Application::elggDir()->getPath("mod/{$plugin}");
return !file_exists($from) && symlink($to, $from);
}