31 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated and is no longer used as a plugin hook handler',
'2.3');
40 if (
$type ==
'walled_garden' ||
$type ==
'csrf') {
44 $status_code = (int)
$type;
45 if ($status_code < 100 || ($status_code > 299 && $status_code < 400) || $status_code > 599) {
54 $headers[
'Content-Type'] =
'application/json; charset=UTF-8';
68 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated and is no longer used as a plugin hook handler',
'2.3');
87 $input = array_shift($inputs);
91 return file_get_contents(
$input->getPathname());
110 $square =
false, $upscale =
false) {
144 $square =
false, $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0, $upscale =
false) {
154 $tmp_filename = tempnam(sys_get_temp_dir(),
'icon_resize');
164 'upscale' => $upscale,
167 $image_bytes =
false;
169 $image_bytes = file_get_contents($tmp_filename);
172 unlink($tmp_filename);
207 'selectionheight' => $params[
'y2'] - $params[
'y1'],
208 'xoffset' => $params[
'x1'],
209 'yoffset' => $params[
'y1'],
212 elgg_log($ex->getMessage(),
'ERROR');
231 elgg_deprecated_notice(__FUNCTION__ .
' has been deprecated. Refrain from updating last action timestamp manually',
'2.3');
253 elgg_deprecated_notice(__FUNCTION__ .
' has been deprecated by ElggUser::getNotificationSettings()',
'2.3');
264 return (
object)
$user->getNotificationSettings();
278 elgg_deprecated_notice(__FUNCTION__ .
' has been deprecated by ElggUser::setNotificationSetting()',
'2.3');
297 return $user->setNotificationSetting($method, (
bool)
$value);
315 elgg_deprecated_notice(__FUNCTION__ .
' is deprecated. Error pages are drawn by resource views without "forward" hook.',
'2.3');
321 if (
$vars === null) {
365 unset(
$vars[
'label']);
367 if (isset(
$vars[
'help'])) {
369 unset(
$vars[
'help']);
371 if (isset(
$vars[
'field_class'])) {
373 unset(
$vars[
'field_class']);
ajax_forward_hook($hook, $type, $forward_url, $params)
Catch calls to forward() in ajax request and force an exit.
if(!$entity->delete()) $forward_url
if(!array_key_exists($filename, $text_files)) $file
$params
Saves global plugin settings.
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
elgg_view_resource($name, array $vars=[])
Render a resource view.
get_image_resize_parameters($width, $height, array $params=[])
Calculate the parameters for resizing an image.
elgg_error_page_handler($hook, $type, $result, $params)
Serve an error page.
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
$guid
Removes an admin notice.
catch(LoginException $e) if($request->isXhr()) $output
elgg_get_uploaded_files($input_name)
Returns an array of uploaded file objects regardless of upload status/errors.
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
get_resized_image_from_existing_file($input_name, $maxwidth, $maxheight, $square=false, $x1=0, $y1=0, $x2=0, $y2=0, $upscale=false)
Gets the jpeg contents of the resized version of an already uploaded image (Returns false if the file...
$user_guid
Validate a user.
get_uploaded_file($input_name)
Get the contents of an uploaded file.
sanitize_string($string)
Sanitizes a string for use in a query.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
elgg echo
Translates a string.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
get_user_notification_settings($user_guid=0)
Get the notification settings for a given user.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
sanitise_string($string)
Alias of sanitize_string.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
update_entity_last_action($guid, $posted=null)
Update the last_action column in the entities table for $guid.
elgg_ok_response($content= '', $message= '', $forward_url=null, $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
get_resized_image_from_uploaded_file($input_name, $maxwidth, $maxheight, $square=false, $upscale=false)
Gets the jpeg contents of the resized version of an uploaded image (Returns false if the uploaded fil...
elgg register_error
Wrapper function for system_messages.
elgg_save_resized_image($source, $destination=null, array $params=[])
Crops and resizes an image.
_elgg_services()
Get the global service provider.
sanitise_int($int, $signed=true)
Alias of sanitize_int.
elgg_is_xhr()
Checks whether the request was requested via ajax.
elgg_view_input($input_type, array $vars=[])
Renders a form field.
set_user_notification_setting($user_guid, $method, $value)
Set a user notification pref.
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
get_entity($guid)
Loads and returns an entity object from a guid.
ajax_action_hook()
Buffer all output echo'd directly in the action for inclusion in the returned JSON.