Elgg  Version 6.1
Functions
configuration.php File Reference

Go to the source code of this file.

Functions

 elgg_get_site_url ()
 Get the URL for the current (or specified) site, ending with "/". More...
 
 elgg_get_plugins_path ()
 Get the plugin path for this installation, ending with slash. More...
 
 elgg_get_data_path ()
 Get the data directory path for this installation, ending with slash. More...
 
 elgg_get_cache_path ()
 Get the cache directory path for this installation, ending with slash. More...
 
 elgg_get_asset_path ()
 Get the asset cache directory path for this installation, ending with slash. More...
 
 elgg_get_root_path ()
 Get the project path (where composer is installed), ending with slash. More...
 
 elgg_sanitize_path (string $path, bool $append_slash=true)
 Sanitize file paths ensuring that they begin and end with slashes etc. More...
 
 elgg_get_release ()
 Get the current Elgg release. More...
 
 elgg_get_config (string $name, $default=null)
 Get an Elgg configuration value. More...
 
 elgg_set_config (string $name, $value)
 Set an Elgg configuration value. More...
 
 elgg_save_config (string $name, $value)
 Save a configuration setting. More...
 
 elgg_remove_config (string $name)
 Removes a config setting. More...
 
 elgg_get_icon_sizes (string $entity_type=null, string $entity_subtype=null, $type= 'icon')
 Returns a configuration array of icon sizes. More...
 
 elgg_comments_are_latest_first (\ElggEntity $container=null)
 Are comments displayed with latest first? More...
 
 elgg_comments_per_page (\ElggEntity $container=null)
 How many comments appear per page. More...
 

Function Documentation

elgg_comments_are_latest_first ( \ElggEntity  $container = null)

Are comments displayed with latest first?

Parameters
ElggEntity$containerEntity containing comments
Returns
bool False means oldest first.
Since
3.0

Definition at line 203 of file configuration.php.

elgg_comments_per_page ( \ElggEntity  $container = null)

How many comments appear per page.

Parameters
ElggEntity$containerEntity containing comments
Returns
int
Since
3.0

Definition at line 217 of file configuration.php.

elgg_get_asset_path ( )

Get the asset cache directory path for this installation, ending with slash.

Returns
string

Definition at line 64 of file configuration.php.

elgg_get_cache_path ( )

Get the cache directory path for this installation, ending with slash.

Returns
string

Definition at line 55 of file configuration.php.

elgg_get_config ( string  $name,
  $default = null 
)

Get an Elgg configuration value.

Parameters
string$nameName of the configuration value
mixed$default(optional) default value if configuration value is not set
Returns
mixed Configuration value or the default value if it does not exist
Since
1.8.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 136 of file configuration.php.

elgg_get_data_path ( )

Get the data directory path for this installation, ending with slash.

Returns
string
Since
1.8.0

Definition at line 46 of file configuration.php.

elgg_get_icon_sizes ( string  $entity_type = null,
string  $entity_subtype = null,
  $type = 'icon' 
)

Returns a configuration array of icon sizes.

Parameters
string$entity_typeEntity type
string$entity_subtypeEntity subtype
string$typeThe name of the icon. e.g., 'icon', 'cover_photo'
Returns
array

Definition at line 192 of file configuration.php.

elgg_get_plugins_path ( )

Get the plugin path for this installation, ending with slash.

Returns
string
Since
1.8.0

Definition at line 36 of file configuration.php.

elgg_get_release ( )

Get the current Elgg release.

Returns
string
Exceptions
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 102 of file configuration.php.

elgg_get_root_path ( )

Get the project path (where composer is installed), ending with slash.

Note: This is not the same as the Elgg root! In the Elgg 1.x series, Elgg was always at the install root, but as of 2.0, Elgg can be installed as a composer dependency, so you cannot assume that it the install root anymore.

Returns
string
Since
1.8.0

Definition at line 78 of file configuration.php.

elgg_get_site_url ( )

Get the URL for the current (or specified) site, ending with "/".

Returns
string
Since
1.8.0
Examples:
/root/Elgg/engine/classes/Elgg/Http/Urls.php, /root/Elgg/engine/lib/output.php, and /root/Elgg/engine/lib/views.php.

Definition at line 26 of file configuration.php.

elgg_remove_config ( string  $name)

Removes a config setting.

Parameters
string$nameThe name of the field.
Returns
bool Success or failure

Definition at line 180 of file configuration.php.

elgg_sanitize_path ( string  $path,
bool  $append_slash = true 
)

Sanitize file paths ensuring that they begin and end with slashes etc.

Parameters
string$pathThe path
bool$append_slashAdd trailing slash
Returns
string
Since
4.3

Definition at line 91 of file configuration.php.

elgg_save_config ( string  $name,
  $value 
)

Save a configuration setting.

Parameters
string$nameConfiguration name (cannot be greater than 255 characters)
mixed$valueConfiguration value. Should be string for installation setting
Returns
bool
Since
1.8.0

Definition at line 169 of file configuration.php.

elgg_set_config ( string  $name,
  $value 
)

Set an Elgg configuration value.

Warning
This does not persist the configuration setting. Use elgg_save_config()
Parameters
string$nameName of the configuration value
mixed$valueValue
Returns
void
Since
1.8.0

Definition at line 156 of file configuration.php.