56 $allowed_views = $ajax_api->getViews();
69 foreach (
$request->getHttpRequest()->query->keys() as
$name) {
73 if (isset(
$vars[
'guid'])) {
77 if (isset(
$vars[
'river_id'])) {
88 $content_type =
'text/html';
91 $content_type =
_elgg_services()->mimetype->getMimeType($file, $content_type);
if(! $user||! $user->canDelete()) $name
if(!empty($avatar) &&! $avatar->isValid()) elseif(empty($avatar)) if(! $owner->saveIconFromUploadedFile('avatar')) if(!elgg_trigger_event('profileiconupdate', $owner->type, $owner)) $view
Controller to handle /ajax requests.
__invoke(Request $request)
Respond to a request.
Exception thrown if an argument is not of the expected type.
const ELGG_HTTP_FORBIDDEN
const ELGG_HTTP_NOT_FOUND
const ELGG_HTTP_BAD_REQUEST
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page.
elgg_set_http_header(string $header, bool $replace=true)
Set a response HTTP header.
_elgg_services()
Get the global service provider.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg_admin_gatekeeper()
Used at the top of a page to mark it as admin only.
HTTP response builder interface.
elgg_get_viewtype()
Return the current view type.
elgg_view_exists(string $view, string $viewtype='', bool $recurse=true)
Returns whether the specified view exists.
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
elgg_ok_response($content='', string|array $message='', ?string $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
elgg_error_response(string|array $message='', string $forward_url=REFERRER, int $status_code=ELGG_HTTP_BAD_REQUEST)
Prepare an error response to be returned by a page or an action handler.
elgg_get_river_item_from_id(int $id)
Get river item from its ID.