Elgg  Version 3.0
Functions | Variables
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_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_config ()
 Get the Elgg config service. More...
 
 _elgg_config_test ($hook, $type, $tests)
 Register unit tests. More...
 
 elgg_get_icon_sizes ($entity_type=null, $entity_subtype=null, $type= 'icon')
 Returns a configuration array of icon sizes. More...
 

Variables

return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

_elgg_config ( )

Get the Elgg config service.

Returns
Examples:
/root/Elgg/engine/classes/ElggBatch.php, and /root/Elgg/engine/lib/views.php.

Definition at line 164 of file configuration.php.

_elgg_config_test (   $hook,
  $type,
  $tests 
)

Register unit tests.

Parameters
string$hook'unit_test'
string$type'system'
array$testscurrent return value
Returns
array

Definition at line 185 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

Definition at line 105 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 198 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_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 154 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 143 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
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 130 of file configuration.php.

Variable Documentation

See also
::loadCore Do not do work here. Just register for events.

Definition at line 205 of file configuration.php.