Elgg
Version 2.3
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
elgg () | |
Get a reference to the global Application object. More... | |
elgg_register_library ($name, $location) | |
Register a PHP file as a library. More... | |
elgg_load_library ($name) | |
Load a PHP library. More... | |
forward ($location="", $reason= 'system') | |
Forward to $location. More... | |
elgg_set_http_header ($header, $replace=true) | |
Set a response HTTP header. More... | |
elgg_register_js ($name, $url, $location= 'head', $priority=null) | |
Register a JavaScript file for inclusion. More... | |
elgg_define_js ($name, $config) | |
Defines a JS lib as an AMD module. More... | |
elgg_unregister_js ($name) | |
Unregister a JavaScript file. More... | |
elgg_load_js ($name) | |
Load a JavaScript resource on this page. More... | |
elgg_require_js ($name) | |
Request that Elgg load an AMD module onto the page. More... | |
elgg_unrequire_js ($name) | |
Cancel a request to load an AMD module onto the page. More... | |
elgg_get_loaded_js ($location= 'head') | |
Get the JavaScript URLs that are loaded. More... | |
elgg_register_css ($name, $url, $priority=null) | |
Register a CSS file for inclusion in the HTML head. More... | |
elgg_unregister_css ($name) | |
Unregister a CSS file. More... | |
elgg_load_css ($name) | |
Load a CSS file for this page. More... | |
elgg_get_loaded_css () | |
Get the loaded CSS URLs. More... | |
elgg_register_external_file ($type, $name, $url, $location, $priority=500) | |
Core registration function for external files. More... | |
elgg_unregister_external_file ($type, $name) | |
Unregister an external file. More... | |
elgg_load_external_file ($type, $name) | |
Load an external resource for use on this page. More... | |
elgg_get_loaded_external_files ($type, $location) | |
Get external resource descriptors. More... | |
elgg_get_file_list ($directory, $exceptions=array(), $list=array(), $extensions=null) | |
Returns a list of files in $directory. More... | |
sanitise_filepath ($path, $append_slash=true) | |
Sanitise file paths ensuring that they begin and end with slashes etc. More... | |
count_messages ($register="") | |
Counts the number of messages, either globally or in a particular register. More... | |
system_message ($message) | |
Display a system message on next page load. More... | |
register_error ($error) | |
Display an error on next page load. More... | |
elgg_get_system_messages () | |
Get a copy of the current system messages. More... | |
elgg_set_system_messages (\Elgg\SystemMessages\RegisterSet $set) | |
Set the system messages. More... | |
elgg_register_event_handler ($event, $object_type, $callback, $priority=500) | |
elgg_unregister_event_handler ($event, $object_type, $callback) | |
Unregisters a callback for an event. More... | |
elgg_clear_event_handlers ($event, $object_type) | |
Clears all callback registrations for a event. More... | |
elgg_trigger_event ($event, $object_type, $object=null) | |
elgg_trigger_before_event ($event, $object_type, $object=null) | |
Trigger a "Before event" indicating a process is about to begin. More... | |
elgg_trigger_after_event ($event, $object_type, $object=null) | |
Trigger an "After event" indicating a process has finished. More... | |
elgg_trigger_deprecated_event ($event, $object_type, $object=null, $message, $version) | |
Trigger an event normally, but send a notice about deprecated use if any handlers are registered. More... | |
elgg_register_plugin_hook_handler ($hook, $type, $callback, $priority=500) | |
elgg_unregister_plugin_hook_handler ($hook, $entity_type, $callback) | |
Unregister a callback as a plugin hook. More... | |
elgg_clear_plugin_hook_handlers ($hook, $type) | |
Clears all callback registrations for a plugin hook. More... | |
elgg_trigger_plugin_hook ($hook, $type, $params=null, $returnvalue=null) | |
elgg_get_ordered_hook_handlers ($hook, $type) | |
Returns an ordered array of hook handlers registered for $hook and $type. More... | |
elgg_get_ordered_event_handlers ($event, $type) | |
Returns an ordered array of event handlers registered for $event and $type. More... | |
_elgg_php_exception_handler ($exception) | |
Intercepts, logs, and displays uncaught exceptions. More... | |
_elgg_php_error_handler ($errno, $errmsg, $filename, $linenum, $vars) | |
Intercepts catchable PHP errors. More... | |
elgg_log ($message, $level= 'NOTICE') | |
Display or log a message. More... | |
elgg_dump ($value, $to_screen=true) | |
Logs or displays $value. More... | |
elgg_get_version ($human_readable=false) | |
Get the current Elgg version information. More... | |
elgg_deprecated_notice ($msg, $dep_version, $backtrace_level=1) | |
Log a notice about deprecated use of a function, view, etc. More... | |
elgg_http_build_url (array $parts, $html_encode=true) | |
Builds a URL from the a parts array like one returned by parse_url(). More... | |
elgg_add_action_tokens_to_url ($url, $html_encode=false) | |
Adds action tokens to URL. More... | |
elgg_http_remove_url_query_element ($url, $element) | |
Removes an element from a URL's query string. More... | |
elgg_http_add_url_query_elements ($url, array $elements) | |
Sets elements in a URL's query string. More... | |
elgg_http_url_is_identical ($url1, $url2, $ignore_params=array('offset', 'limit')) | |
Test if two URLs are functionally identical. More... | |
elgg_http_get_signed_url ($url, $expires=false) | |
Signs provided URL with a SHA256 HMAC key. More... | |
elgg_http_validate_signed_url ($url) | |
Validates if the HMAC signature of the URL is valid. More... | |
elgg_signed_request_gatekeeper () | |
Validates if the HMAC signature of the current request is valid Issues 403 response if signature is inalid. More... | |
elgg_extract ($key, $array, $default=null, $strict=true) | |
Checks for $array[$key] and returns its value if it exists, else returns $default. More... | |
elgg_extract_class (array $array, $existing=[]) | |
Extract class names from an array with key "class", optionally merging into a preexisting set. More... | |
elgg_sort_3d_array_by_value (&$array, $element, $sort_order=SORT_ASC, $sort_type=SORT_LOCALE_STRING) | |
Sorts a 3d array by specific element. More... | |
ini_get_bool ($ini_get_arg) | |
Return the state of a php.ini setting as a bool. More... | |
elgg_get_ini_setting_in_bytes ($setting) | |
Returns a PHP INI setting in bytes. More... | |
is_not_null ($string) | |
Returns true is string is not empty, false, or null. More... | |
_elgg_normalize_plural_options_array ($options, $singulars) | |
Normalise the singular keys in an options array to plural keys. More... | |
_elgg_shutdown_hook () | |
Emits a shutdown:system event upon PHP shutdown, but before database connections are dropped. More... | |
_elgg_js_page_handler ($page) | |
Serve javascript pages. More... | |
_elgg_ajax_page_handler ($segments) | |
Serve individual views for Ajax. More... | |
_elgg_css_page_handler ($page) | |
Serve CSS. More... | |
_elgg_favicon_page_handler ($segments) | |
Handle requests for /favicon.ico. More... | |
_elgg_cacheable_view_page_handler ($page, $type) | |
Serves a JS or CSS view with headers for caching. More... | |
_elgg_sql_reverse_order_by_clause ($order_by) | |
Reverses the ordering in an ORDER BY clause. More... | |
elgg_batch_enable_callback ($object) | |
Enable objects with an enable() method. More... | |
elgg_batch_disable_callback ($object) | |
Disable objects with a disable() method. More... | |
elgg_batch_delete_callback ($object) | |
Delete objects with a delete() method. More... | |
_elgg_is_valid_options_for_batch_operation ($options, $type) | |
Checks if there are some constraints on the options array for potentially dangerous operations. More... | |
_elgg_walled_garden_index () | |
Intercepts the index page when Walled Garden mode is enabled. More... | |
_elgg_walled_garden_ajax_handler ($page) | |
Serve walled garden sections. More... | |
_elgg_walled_garden_init () | |
Checks the status of the Walled Garden and forwards to a login page if required. More... | |
_elgg_walled_garden_remove_public_access ($hook, $type, $accesses) | |
Remove public access for walled gardens. More... | |
_elgg_init () | |
Elgg's main init. More... | |
_elgg_api_test ($hook, $type, $value, $params) | |
Adds unit tests for the general API. More... | |
_elgg_ajax_page_handler | ( | $segments | ) |
Serve individual views for Ajax.
/ajax/view/<view_name>?<key/value params> /ajax/form/<action_name>?<key/value params>
string[] | $segments URL segments (not including "ajax") |
Definition at line 1617 of file elgglib.php.
_elgg_api_test | ( | $hook, | |
$type, | |||
$value, | |||
$params | |||
) |
Adds unit tests for the general API.
string | $hook | unit_test |
string | $type | system |
array | $value | array of test files |
array | $params | empty |
unit_tests system
Definition at line 2064 of file elgglib.php.
_elgg_cacheable_view_page_handler | ( | $page, | |
$type | |||
) |
Serves a JS or CSS view with headers for caching.
/<css||js>/name/of/view.<last_cache>.<css||js>
array | $page | The page array |
string | $type | The type: js or css |
Definition at line 1739 of file elgglib.php.
_elgg_css_page_handler | ( | $page | ) |
Serve CSS.
Serves CSS from the css views directory with headers for caching control
array | $page | The page array |
Definition at line 1696 of file elgglib.php.
_elgg_favicon_page_handler | ( | $segments | ) |
Handle requests for /favicon.ico.
string[] | $segments The URL segments |
Definition at line 1713 of file elgglib.php.
_elgg_init | ( | ) |
Elgg's main init.
Handles core actions for comments, the JS pagehandler, and the shutdown function.
init system
Definition at line 2015 of file elgglib.php.
_elgg_is_valid_options_for_batch_operation | ( | $options, | |
$type | |||
) |
Checks if there are some constraints on the options array for potentially dangerous operations.
array | $options | Options array |
string | $type | Options type: metadata or annotation |
Definition at line 1870 of file elgglib.php.
_elgg_js_page_handler | ( | $page | ) |
Serve javascript pages.
Searches for views under js/ and outputs them with special headers for caching control.
array | $page | The page array |
Definition at line 1600 of file elgglib.php.
_elgg_normalize_plural_options_array | ( | $options, | |
$singulars | |||
) |
Normalise the singular keys in an options array to plural keys.
Used in elgg_get_entities*() functions to support shortcutting plural names by singular names.
array | $options | The options array. $options['keys'] = 'values'; |
array | $singulars | A list of singular words to pluralize by adding 's'. |
Definition at line 1528 of file elgglib.php.
_elgg_php_error_handler | ( | $errno, | |
$errmsg, | |||
$filename, | |||
$linenum, | |||
$vars | |||
) |
Intercepts catchable PHP errors.
Definition at line 964 of file elgglib.php.
_elgg_php_exception_handler | ( | $exception | ) |
Intercepts, logs, and displays uncaught exceptions.
To use a viewtype other than failsafe, create the views: <viewtype>/messages/exceptions/admin_exception <viewtype>/messages/exceptions/exception See the json viewtype for an example.
Exception | $exception | The exception being handled |
Definition at line 875 of file elgglib.php.
_elgg_shutdown_hook | ( | ) |
Emits a shutdown:system event upon PHP shutdown, but before database connections are dropped.
Register for the shutdown:system event to perform functions at the end of page loads.
Definition at line 1568 of file elgglib.php.
_elgg_sql_reverse_order_by_clause | ( | $order_by | ) |
Reverses the ordering in an ORDER BY clause.
This is achived by replacing asc with desc, or appending desc to the end of the clause.
This is used mostly for elgg_get_entities() and other similar functions.
string | $order_by | An order by clause private |
Definition at line 1802 of file elgglib.php.
_elgg_walled_garden_ajax_handler | ( | $page | ) |
Serve walled garden sections.
array | $page | Array of URL segments |
Definition at line 1935 of file elgglib.php.
_elgg_walled_garden_index | ( | ) |
Intercepts the index page when Walled Garden mode is enabled.
Definition at line 1923 of file elgglib.php.
_elgg_walled_garden_init | ( | ) |
Checks the status of the Walled Garden and forwards to a login page if required.
If the site is in Walled Garden mode, all page except those registered as plugin pages by { public_pages walled_garden} will redirect to a login page.
Definition at line 1962 of file elgglib.php.
_elgg_walled_garden_remove_public_access | ( | $hook, | |
$type, | |||
$accesses | |||
) |
Remove public access for walled gardens.
string | $hook | 'access:collections:write' |
string | $type | 'all' |
array | $accesses | current access list |
Definition at line 1993 of file elgglib.php.
count_messages | ( | $register = "" | ) |
Counts the number of messages, either globally or in a particular register.
string | $register | Optionally, the register |
Definition at line 437 of file elgglib.php.
elgg | ( | ) |
Get a reference to the global Application object.
Definition at line 20 of file elgglib.php.
elgg_add_action_tokens_to_url | ( | $url, | |
$html_encode = false |
|||
) |
Adds action tokens to URL.
As of 1.7.0 action tokens are required on all actions. Use this function to append action tokens to a URL's GET parameters. This will preserve any existing GET parameters.
string | $url | Full action URL |
bool | $html_encode | HTML encode the url? (default: false) |
Definition at line 1151 of file elgglib.php.
elgg_batch_delete_callback | ( | $object | ) |
Delete objects with a delete() method.
Used as a callback for .
object | $object | The object to disable |
Definition at line 1856 of file elgglib.php.
elgg_batch_disable_callback | ( | $object | ) |
Disable objects with a disable() method.
Used as a callback for .
object | $object | The object to disable |
Definition at line 1842 of file elgglib.php.
elgg_batch_enable_callback | ( | $object | ) |
Enable objects with an enable() method.
Used as a callback for .
object | $object | The object to enable |
Definition at line 1828 of file elgglib.php.
elgg_clear_event_handlers | ( | $event, | |
$object_type | |||
) |
Clears all callback registrations for a event.
string | $event | The name of the event |
string | $object_type | The objecttype of the event |
Definition at line 577 of file elgglib.php.
elgg_clear_plugin_hook_handlers | ( | $hook, | |
$type | |||
) |
Clears all callback registrations for a plugin hook.
string | $hook | The name of the hook |
string | $type | The type of the hook |
Definition at line 768 of file elgglib.php.
elgg_define_js | ( | $name, | |
$config | |||
) |
Defines a JS lib as an AMD module.
This is useful for shimming traditional JS or for setting the paths of AMD modules.
Calling multiple times for the same name will:
Use elgg_require_js($name) to load on the current page.
Calling this function is not needed if your JS are in views named like module/name.js
Instead, simply call elgg_require_js("module/name").
string | $name | The module name |
array | $config | An array like the following: array 'deps' An array of AMD module dependencies string 'exports' The name of the exported module string 'src' The URL to the JS. Can be relative. |
Definition at line 183 of file elgglib.php.
elgg_deprecated_notice | ( | $msg, | |
$dep_version, | |||
$backtrace_level = 1 |
|||
) |
Log a notice about deprecated use of a function, view, etc.
string | $msg | Message to log |
string | $dep_version | Human-readable release version: 1.7, 1.8, ... |
int | $backtrace_level | How many levels back to display the backtrace. Useful if calling from functions that are called from other places (like elgg_view()). Set to -1 for a full backtrace. |
Definition at line 1098 of file elgglib.php.
elgg_dump | ( | $value, | |
$to_screen = true |
|||
) |
Logs or displays $value.
If $to_screen is true, $value is displayed to screen. Else, it is handled by PHP's error_log() function.
A { debug log} is called. If a handler returns false, it will stop the default logging method.
mixed | $value | The value |
bool | $to_screen | Display to screen? |
Definition at line 1059 of file elgglib.php.
elgg_extract | ( | $key, | |
$array, | |||
$default = null , |
|||
$strict = true |
|||
) |
Checks for $array[$key] and returns its value if it exists, else returns $default.
Shorthand for $value = (isset($array['key'])) ? $array['key'] : 'default';
string | $key | Key to check in the source array |
array | $array | Source array |
mixed | $default | Value to return if key is not found |
bool | $strict | Return array key if it's set, even if empty. If false, return $default if the array key is unset or empty. |
Definition at line 1375 of file elgglib.php.
elgg_extract_class | ( | array | $array, |
$existing = [] |
|||
) |
Extract class names from an array with key "class", optionally merging into a preexisting set.
array | $array | Source array |
string|string[] | $existing Existing name(s) |
Definition at line 1396 of file elgglib.php.
elgg_get_file_list | ( | $directory, | |
$exceptions = array() , |
|||
$list = array() , |
|||
$extensions = null |
|||
) |
Returns a list of files in $directory.
Only returns files. Does not recurse into subdirs.
string | $directory | Directory to look in |
array | $exceptions | Array of filenames to ignore |
array | $list | Array of files to append to |
mixed | $extensions | Array of extensions to allow, null for all. Use a dot: array('.php'). |
Definition at line 379 of file elgglib.php.
elgg_get_ini_setting_in_bytes | ( | $setting | ) |
Returns a PHP INI setting in bytes.
Use this for arithmetic when determining if a file can be uploaded.
string | $setting | The php.ini setting |
Definition at line 1472 of file elgglib.php.
elgg_get_loaded_css | ( | ) |
elgg_get_loaded_external_files | ( | $type, | |
$location | |||
) |
Get external resource descriptors.
string | $type | Type of file: js or css |
string | $location | Page location |
Definition at line 363 of file elgglib.php.
elgg_get_loaded_js | ( | $location = 'head' | ) |
Get the JavaScript URLs that are loaded.
string | $location | 'head' or 'footer' |
Definition at line 257 of file elgglib.php.
elgg_get_ordered_event_handlers | ( | $event, | |
$type | |||
) |
Returns an ordered array of event handlers registered for $event and $type.
string | $event | Event name |
string | $type | Object type |
Definition at line 854 of file elgglib.php.
elgg_get_ordered_hook_handlers | ( | $hook, | |
$type | |||
) |
Returns an ordered array of hook handlers registered for $hook and $type.
string | $hook | Hook name |
string | $type | Hook type |
Definition at line 840 of file elgglib.php.
elgg_get_system_messages | ( | ) |
Get a copy of the current system messages.
Definition at line 475 of file elgglib.php.
elgg_get_version | ( | $human_readable = false | ) |
Get the current Elgg version information.
bool | $human_readable | Whether to return a human readable version (default: false) |
Definition at line 1071 of file elgglib.php.
elgg_http_add_url_query_elements | ( | $url, | |
array | $elements | ||
) |
Sets elements in a URL's query string.
string | $url | The URL |
array | $elements | Key/value pairs to set in the URL. If the value is null, the element is removed from the URL. |
Definition at line 1199 of file elgglib.php.
elgg_http_build_url | ( | array | $parts, |
$html_encode = true |
|||
) |
Builds a URL from the a parts array like one returned by parse_url().
array | $parts | Associative array of URL components like parse_url() returns 'user' and 'pass' parts are ignored because of security reasons |
bool | $html_encode | HTML Encode the url? |
Definition at line 1116 of file elgglib.php.
elgg_http_get_signed_url | ( | $url, | |
$expires = false |
|||
) |
Signs provided URL with a SHA256 HMAC key.
string | $url | URL to sign |
string | $expires | Expiration time A string suitable for strtotime() Falsey values indicate non-expiring URL |
Definition at line 1334 of file elgglib.php.
elgg_http_remove_url_query_element | ( | $url, | |
$element | |||
) |
Removes an element from a URL's query string.
string | $url | Full URL |
string | $element | The element to remove |
Definition at line 1185 of file elgglib.php.
elgg_http_url_is_identical | ( | $url1, | |
$url2, | |||
$ignore_params = array('offset', 'limit') |
|||
) |
Test if two URLs are functionally identical.
If $ignore_params is used, neither the name nor its value will be considered when comparing.
The order of GET params doesn't matter.
string | $url1 | First URL |
string | $url2 | Second URL |
array | $ignore_params | GET params to ignore in the comparison |
Definition at line 1243 of file elgglib.php.
elgg_http_validate_signed_url | ( | $url | ) |
Validates if the HMAC signature of the URL is valid.
string | $url | URL to validate |
Definition at line 1344 of file elgglib.php.
elgg_load_css | ( | $name | ) |
Load a CSS file for this page.
This must be called before elgg_view_page(). It can be called before the CSS file is registered. If you do not want a CSS file loaded, unregister it.
string | $name | Identifier of the CSS file |
Definition at line 298 of file elgglib.php.
elgg_load_external_file | ( | $type, | |
$name | |||
) |
Load an external resource for use on this page.
string | $type | Type of file: js or css |
string | $name | The identifier for the file |
Definition at line 350 of file elgglib.php.
elgg_load_js | ( | $name | ) |
Load a JavaScript resource on this page.
This must be called before elgg_view_page(). It can be called before the script is registered. If you do not want a script loaded, unregister it.
string | $name | Identifier of the JavaScript resource |
Definition at line 220 of file elgglib.php.
elgg_load_library | ( | $name | ) |
Load a PHP library.
string | $name | The name of the library |
InvalidParameterException |
Definition at line 57 of file elgglib.php.
elgg_log | ( | $message, | |
$level = 'NOTICE' |
|||
) |
Display or log a message.
If $level is >= to the debug setting in ->debug, the message will be sent to elgg_dump(). Messages with lower priority than ->debug are ignored.
Outputs all levels but NOTICE to screen by default.
string | $message | User message |
string | $level | NOTICE | WARNING | ERROR |
Definition at line 1028 of file elgglib.php.
elgg_register_css | ( | $name, | |
$url, | |||
$priority = null |
|||
) |
Register a CSS file for inclusion in the HTML head.
string | $name | An identifier for the CSS file |
string | $url | URL of the CSS file |
int | $priority | Priority of the CSS file (lower numbers load earlier) |
Definition at line 271 of file elgglib.php.
elgg_register_event_handler | ( | $event, | |
$object_type, | |||
$callback, | |||
$priority = 500 |
|||
) |
Definition at line 550 of file elgglib.php.
elgg_register_external_file | ( | $type, | |
$name, | |||
$url, | |||
$location, | |||
$priority = 500 |
|||
) |
Core registration function for external files.
string | $type | Type of external resource (js or css) |
string | $name | Identifier used as key |
string | $url | URL |
string | $location | Location in the page to include the file |
int | $priority | Loading priority of the file |
Definition at line 324 of file elgglib.php.
elgg_register_js | ( | $name, | |
$url, | |||
$location = 'head' , |
|||
$priority = null |
|||
) |
Register a JavaScript file for inclusion.
This function handles adding JavaScript to a web page. If multiple calls are made to register the same JavaScript file based on the $id variable, only the last file is included. This allows a plugin to add JavaScript from a view that may be called more than once. It also handles more than one plugin adding the same JavaScript.
jQuery plugins often have filenames such as jquery.rating.js. A best practice is to base $name on the filename: "jquery.rating". It is recommended to not use version numbers in the name.
The JavaScript files can be local to the server or remote (such as Google's CDN).
string | $name | An identifier for the JavaScript library |
string | $url | URL of the JavaScript file |
string | $location | Page location: head or footer. (default: head) |
int | $priority | Priority of the JS file (lower numbers load earlier) |
Definition at line 155 of file elgglib.php.
elgg_register_library | ( | $name, | |
$location | |||
) |
Register a PHP file as a library.
string | $name | The name of the library |
string | $location | The location of the file |
Definition at line 35 of file elgglib.php.
elgg_register_plugin_hook_handler | ( | $hook, | |
$type, | |||
$callback, | |||
$priority = 500 |
|||
) |
Definition at line 740 of file elgglib.php.
elgg_require_js | ( | $name | ) |
Request that Elgg load an AMD module onto the page.
string | $name | The AMD module name. |
Definition at line 232 of file elgglib.php.
elgg_set_http_header | ( | $header, | |
$replace = true |
|||
) |
Set a response HTTP header.
string | $header | Header |
bool | $replace | Replace existing header |
Definition at line 114 of file elgglib.php.
elgg_set_system_messages | ( | \Elgg\SystemMessages\RegisterSet | $set | ) |
Set the system messages.
This will overwrite the state of all messages and errors!
\Elgg\SystemMessages\RegisterSet | $set | Set of messages |
Definition at line 486 of file elgglib.php.
elgg_signed_request_gatekeeper | ( | ) |
Validates if the HMAC signature of the current request is valid Issues 403 response if signature is inalid.
Definition at line 1353 of file elgglib.php.
elgg_sort_3d_array_by_value | ( | & | $array, |
$element, | |||
$sort_order = SORT_ASC , |
|||
$sort_type = SORT_LOCALE_STRING |
|||
) |
Sorts a 3d array by specific element.
Do this: elgg_sort_3d_array_by_value($my_array); Not this: $my_array = elgg_sort_3d_array_by_value($my_array);
array | &$array | Array to sort |
string | $element | Element to sort by |
int | $sort_order | PHP sort order http://us2.php.net/array_multisort |
int | $sort_type | PHP sort type http://us2.php.net/sort |
Definition at line 1426 of file elgglib.php.
elgg_trigger_after_event | ( | $event, | |
$object_type, | |||
$object = null |
|||
) |
Trigger an "After event" indicating a process has finished.
Unlike regular events, all the handlers will be called, their return values ignored.
To register for an after event, append ":after" to the event name when registering.
string | $event | The event type. The fired event type will be appended with ":after". |
string | $object_type | The object type |
string | $object | The object involved in the event |
Definition at line 654 of file elgglib.php.
elgg_trigger_before_event | ( | $event, | |
$object_type, | |||
$object = null |
|||
) |
Trigger a "Before event" indicating a process is about to begin.
Like regular events, a handler returning false will cancel the process and false will be returned.
To register for a before event, append ":before" to the event name when registering.
string | $event | The event type. The fired event type will be appended with ":before". |
string | $object_type | The object type |
string | $object | The object involved in the event |
Definition at line 635 of file elgglib.php.
elgg_trigger_deprecated_event | ( | $event, | |
$object_type, | |||
$object = null , |
|||
$message, | |||
$version | |||
) |
Trigger an event normally, but send a notice about deprecated use if any handlers are registered.
string | $event | The event type |
string | $object_type | The object type |
string | $object | The object involved in the event |
string | $message | The deprecation message |
string | $version | Human-readable release version: 1.9, 1.10, ... |
Definition at line 671 of file elgglib.php.
elgg_trigger_event | ( | $event, | |
$object_type, | |||
$object = null |
|||
) |
Definition at line 614 of file elgglib.php.
elgg_trigger_plugin_hook | ( | $hook, | |
$type, | |||
$params = null , |
|||
$returnvalue = null |
|||
) |
Definition at line 826 of file elgglib.php.
elgg_unregister_css | ( | $name | ) |
Unregister a CSS file.
string | $name | The identifier for the CSS file |
Definition at line 283 of file elgglib.php.
elgg_unregister_event_handler | ( | $event, | |
$object_type, | |||
$callback | |||
) |
Unregisters a callback for an event.
string | $event | The event type |
string | $object_type | The object type |
string | $callback | The callback. Since 1.11, static method callbacks will match dynamic methods |
Definition at line 564 of file elgglib.php.
elgg_unregister_external_file | ( | $type, | |
$name | |||
) |
Unregister an external file.
string | $type | Type of file: js or css |
string | $name | The identifier of the file |
Definition at line 337 of file elgglib.php.
elgg_unregister_js | ( | $name | ) |
Unregister a JavaScript file.
string | $name | The identifier for the JavaScript library |
Definition at line 205 of file elgglib.php.
elgg_unregister_plugin_hook_handler | ( | $hook, | |
$entity_type, | |||
$callback | |||
) |
Unregister a callback as a plugin hook.
string | $hook | The name of the hook |
string | $entity_type | The name of the type of entity (eg "user", "object" etc) |
callable | $callback | The PHP callback to be removed. Since 1.11, static method callbacks will match dynamic methods |
Definition at line 755 of file elgglib.php.
elgg_unrequire_js | ( | $name | ) |
Cancel a request to load an AMD module onto the page.
string | $name | The AMD module name. |
Definition at line 245 of file elgglib.php.
forward | ( | $location = "" , |
|
$reason = 'system' |
|||
) |
Forward to $location.
Sends a 'Location: $location' header and exists. If headers have already been sent, throws an exception.
string | $location | URL to forward to browser to. This can be a path relative to the network's URL. |
string | $reason | Short explanation for why we're forwarding. Set to '404' to forward to error page. Default message is 'system'. |
SecurityException |
Definition at line 94 of file elgglib.php.
ini_get_bool | ( | $ini_get_arg | ) |
Return the state of a php.ini setting as a bool.
string | $ini_get_arg | The INI setting |
Definition at line 1452 of file elgglib.php.
is_not_null | ( | $string | ) |
Returns true is string is not empty, false, or null.
Function to be used in array_filter which returns true if $string is not null.
string | $string | The string to test |
Definition at line 1507 of file elgglib.php.
register_error | ( | $error | ) |
Display an error on next page load.
string | array | $error | Error or errors to add |
Definition at line 464 of file elgglib.php.
sanitise_filepath | ( | $path, | |
$append_slash = true |
|||
) |
Sanitise file paths ensuring that they begin and end with slashes etc.
string | $path | The path |
bool | $append_slash | Add tailing slash |
Definition at line 411 of file elgglib.php.
system_message | ( | $message | ) |
Display a system message on next page load.
string | array | $message | Message or messages to add |
Definition at line 450 of file elgglib.php.
const ACCESS_DEFAULT -1 |
Definition at line 2081 of file elgglib.php.
const ACCESS_FRIENDS -2 |
Definition at line 2085 of file elgglib.php.
const ACCESS_LOGGED_IN 1 |
Definition at line 2083 of file elgglib.php.
const ACCESS_PRIVATE 0 |
Definition at line 2082 of file elgglib.php.
const ACCESS_PUBLIC 2 |
Definition at line 2084 of file elgglib.php.
const ELGG_ENTITIES_ANY_VALUE null |
Definition at line 2095 of file elgglib.php.
const ELGG_ENTITIES_NO_VALUE 0 |
Definition at line 2104 of file elgglib.php.
const ELGG_HTTP_ACCEPTED 202 |
Definition at line 2133 of file elgglib.php.
const ELGG_HTTP_ALREADY_REPORTED 208 |
Definition at line 2139 of file elgglib.php.
const ELGG_HTTP_BAD_GATEWAY 502 |
Definition at line 2179 of file elgglib.php.
const ELGG_HTTP_BAD_REQUEST 400 |
Definition at line 2150 of file elgglib.php.
const ELGG_HTTP_CONFLICT 409 |
Definition at line 2159 of file elgglib.php.
const ELGG_HTTP_CONTINUE 100 |
HTTP Response codes.
Definition at line 2128 of file elgglib.php.
const ELGG_HTTP_CREATED 201 |
Definition at line 2132 of file elgglib.php.
const ELGG_HTTP_EXPECTATION_FAILED 417 |
Definition at line 2167 of file elgglib.php.
const ELGG_HTTP_FAILED_DEPENDENCY 424 |
Definition at line 2171 of file elgglib.php.
const ELGG_HTTP_FORBIDDEN 403 |
Definition at line 2153 of file elgglib.php.
const ELGG_HTTP_FOUND 302 |
Definition at line 2143 of file elgglib.php.
const ELGG_HTTP_GATEWAY_TIMEOUT 504 |
Definition at line 2181 of file elgglib.php.
const ELGG_HTTP_GONE 410 |
Definition at line 2160 of file elgglib.php.
const ELGG_HTTP_I_AM_A_TEAPOT 418 |
Definition at line 2168 of file elgglib.php.
const ELGG_HTTP_IM_USED 226 |
Definition at line 2140 of file elgglib.php.
const ELGG_HTTP_INSUFFICIENT_STORAGE 507 |
Definition at line 2184 of file elgglib.php.
const ELGG_HTTP_INTERNAL_SERVER_ERROR 500 |
Definition at line 2177 of file elgglib.php.
const ELGG_HTTP_LENGTH_REQUIRED 411 |
Definition at line 2161 of file elgglib.php.
const ELGG_HTTP_LOCKED 423 |
Definition at line 2170 of file elgglib.php.
const ELGG_HTTP_LOOP_DETECTED 508 |
Definition at line 2185 of file elgglib.php.
const ELGG_HTTP_METHOD_NOT_ALLOWED 405 |
Definition at line 2155 of file elgglib.php.
const ELGG_HTTP_MOVED_PERMANENTLY 301 |
Definition at line 2142 of file elgglib.php.
const ELGG_HTTP_MULTI_STATUS 207 |
Definition at line 2138 of file elgglib.php.
const ELGG_HTTP_MULTIPLE_CHOICES 300 |
Definition at line 2141 of file elgglib.php.
const ELGG_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511 |
Definition at line 2187 of file elgglib.php.
const ELGG_HTTP_NO_CONTENT 204 |
Definition at line 2135 of file elgglib.php.
const ELGG_HTTP_NON_AUTHORITATIVE_INFORMATION 203 |
Definition at line 2134 of file elgglib.php.
const ELGG_HTTP_NOT_ACCEPTABLE 406 |
Definition at line 2156 of file elgglib.php.
const ELGG_HTTP_NOT_EXTENDED 510 |
Definition at line 2186 of file elgglib.php.
const ELGG_HTTP_NOT_FOUND 404 |
Definition at line 2154 of file elgglib.php.
const ELGG_HTTP_NOT_IMPLEMENTED 501 |
Definition at line 2178 of file elgglib.php.
const ELGG_HTTP_NOT_MODIFIED 304 |
Definition at line 2145 of file elgglib.php.
const ELGG_HTTP_OK 200 |
Definition at line 2131 of file elgglib.php.
const ELGG_HTTP_PARTIAL_CONTENT 206 |
Definition at line 2137 of file elgglib.php.
const ELGG_HTTP_PAYMENT_REQUIRED 402 |
Definition at line 2152 of file elgglib.php.
const ELGG_HTTP_PERMANENTLY_REDIRECT 308 |
Definition at line 2149 of file elgglib.php.
const ELGG_HTTP_PRECONDITION_FAILED 412 |
Definition at line 2162 of file elgglib.php.
const ELGG_HTTP_PRECONDITION_REQUIRED 428 |
Definition at line 2174 of file elgglib.php.
const ELGG_HTTP_PROCESSING 102 |
Definition at line 2130 of file elgglib.php.
const ELGG_HTTP_PROXY_AUTHENTICATION_REQUIRED 407 |
Definition at line 2157 of file elgglib.php.
const ELGG_HTTP_REQUEST_ENTITY_TOO_LARGE 413 |
Definition at line 2163 of file elgglib.php.
const ELGG_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431 |
Definition at line 2176 of file elgglib.php.
const ELGG_HTTP_REQUEST_TIMEOUT 408 |
Definition at line 2158 of file elgglib.php.
const ELGG_HTTP_REQUEST_URI_TOO_LONG 414 |
Definition at line 2164 of file elgglib.php.
const ELGG_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE 416 |
Definition at line 2166 of file elgglib.php.
const ELGG_HTTP_RESERVED 306 |
Definition at line 2147 of file elgglib.php.
const ELGG_HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL 425 |
Definition at line 2172 of file elgglib.php.
const ELGG_HTTP_RESET_CONTENT 205 |
Definition at line 2136 of file elgglib.php.
const ELGG_HTTP_SEE_OTHER 303 |
Definition at line 2144 of file elgglib.php.
const ELGG_HTTP_SERVICE_UNAVAILABLE 503 |
Definition at line 2180 of file elgglib.php.
const ELGG_HTTP_SWITCHING_PROTOCOLS 101 |
Definition at line 2129 of file elgglib.php.
const ELGG_HTTP_TEMPORARY_REDIRECT 307 |
Definition at line 2148 of file elgglib.php.
const ELGG_HTTP_TOO_MANY_REQUESTS 429 |
Definition at line 2175 of file elgglib.php.
const ELGG_HTTP_UNAUTHORIZED 401 |
Definition at line 2151 of file elgglib.php.
const ELGG_HTTP_UNPROCESSABLE_ENTITY 422 |
Definition at line 2169 of file elgglib.php.
const ELGG_HTTP_UNSUPPORTED_MEDIA_TYPE 415 |
Definition at line 2165 of file elgglib.php.
const ELGG_HTTP_UPGRADE_REQUIRED 426 |
Definition at line 2173 of file elgglib.php.
const ELGG_HTTP_USE_PROXY 305 |
Definition at line 2146 of file elgglib.php.
const ELGG_HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL 506 |
Definition at line 2183 of file elgglib.php.
const ELGG_HTTP_VERSION_NOT_SUPPORTED 505 |
Definition at line 2182 of file elgglib.php.
const ELGG_JSON_ENCODING JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT |
Default JSON encoding.
Definition at line 2192 of file elgglib.php.
return function(\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks) |
Definition at line 2194 of file elgglib.php.
const REFERER -1 |
Definition at line 2123 of file elgglib.php.
const REFERRER -1 |
Definition at line 2113 of file elgglib.php.