59 return Paths::sanitize(
$path);
71 return Paths::sanitize(
$path);
98 return Paths::sanitize($path, $append_slash);
111 if (!isset($release)) {
112 $composerJson = file_get_contents(\
Elgg\Project\
Paths::elgg() .
'composer.json');
113 if ($composerJson ===
false) {
114 throw new ElggException(
"Unable to read composer.json file!");
117 $composer = json_decode($composerJson);
118 if ($composer === null) {
119 throw new ElggException(
"JSON parse error while reading composer.json!");
123 if (!isset($composer->version)) {
124 throw new ElggException(
"Version field must be set in composer.json!");
126 $release = $composer->version;
143 elgg_log(
"Config value for '$name' is not set'",
'INFO');
elgg_get_release()
Get the current Elgg release.
elgg_get_asset_path()
Get the asset cache directory path for this installation, ending with slash.
$params
Saves global plugin settings.
if(!$user||!$user->canDelete()) $name
elgg_get_icon_sizes($entity_type=null, $entity_subtype=null, $type= 'icon')
Returns a configuration array of icon sizes.
elgg_sanitize_path(string $path, bool $append_slash=true)
Sanitize file paths ensuring that they begin and end with slashes etc.
elgg_comments_per_page(ElggEntity $container=null)
How many comments appear per page.
elgg_save_config($name, $value)
Save a configuration setting.
elgg_get_cache_path()
Get the cache directory path for this installation, ending with slash.
elgg_set_config($name, $value)
Set an Elgg configuration value.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
elgg_get_root_path()
Get the project path (where composer is installed), ending with slash.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
_elgg_services()
Get the global service provider.
elgg_get_plugins_path()
Get the plugin path for this installation, ending with slash.
elgg_get_data_path()
Get the data directory path for this installation, ending with slash.
elgg_comments_are_latest_first(ElggEntity $container=null)
Are comments displayed with latest first?
elgg_remove_config($name)
Removes a config setting.
elgg_get_config($name, $default=null)
Get an Elgg configuration value.