Elgg  Version 4.x
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_get_engine_path ()
 /path/to/elgg/engine with no trailing slash. More...
 
 elgg_get_release ()
 Get the current Elgg release. More...
 
 elgg_get_config ($name, $default=null)
 Get an Elgg configuration value. More...
 
 elgg_set_config ($name, $value)
 Set an Elgg configuration value. More...
 
 elgg_save_config ($name, $value)
 Save a configuration setting. More...
 
 elgg_remove_config ($name)
 Removes a config setting. More...
 
 elgg_get_icon_sizes ($entity_type=null, $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.

If not set in settings, the cache path will be returned.

Returns
string

Definition at line 68 of file configuration.php.

elgg_get_cache_path ( )

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

If not set in settings, the data path will be returned.

Returns
string

Definition at line 56 of file configuration.php.

elgg_get_config (   $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 45 of file configuration.php.

elgg_get_engine_path ( )

/path/to/elgg/engine with no trailing slash.

Returns
string

Definition at line 92 of file configuration.php.

elgg_get_icon_sizes (   $entity_type = null,
  $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 35 of file configuration.php.

elgg_get_release ( )

Get the current Elgg release.

Returns
string
Exceptions
Exceptionif something wrong with the composer.json
Since
4.1
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 103 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 83 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/lib/output.php, and /root/Elgg/engine/lib/views.php.

Definition at line 25 of file configuration.php.

elgg_remove_config (   $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_save_config (   $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 (   $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.