197 return _elgg_services()->views->unextendView($view, $view_extension);
242 if (is_array($body)) {
250 if (!
$timer->hasEnded([
'build page'])) {
251 $timer->end([
'build page']);
254 $timer->begin([__FUNCTION__]);
259 array_shift(
$params[
'segments']);
265 if ($system_messages->count()) {
266 $messages = $system_messages->dumpRegister();
282 $vars[
'page_shell'] = $page_shell;
293 $timer->end([__FUNCTION__]);
308 $view =
"resources/{$name}";
354 if (!
$timer->hasEnded([
'build page'])) {
355 $timer->end([
'build page']);
358 $timer->begin([__FUNCTION__]);
362 array_shift(
$vars[
'segments']);
366 $vars[
'layout'] = $layout_name;
369 "page/layouts/{$layout_name}",
370 'page/layouts/default',
374 foreach ($layout_views as $layout_view) {
381 $timer->end([__FUNCTION__]);
444 unset(
$vars[
'menu_view']);
446 if (is_string(
$menu)) {
461 "navigation/menu/{$name}",
462 'navigation/menu/default',
507 $entity_type = $entity->
getType();
512 "{$entity_type}/{$entity_subtype}",
513 "{$entity_type}/default",
517 foreach ($entity_views as
$view) {
547 $entity_type = $entity->
getType();
591 $name = $annotation->name;
596 $annotation_views = [
598 "annotation/{$name}",
599 'annotation/default',
602 foreach ($annotation_views as
$view) {
640 $list_type =
get_input(
'list_type',
'list');
643 'items' => $entities,
644 'list_class' =>
'elgg-list-entity',
646 'pagination' =>
true,
647 'list_type' => $list_type,
656 $vars[
'pagination'] =
false;
659 $view =
"page/components/{$vars['list_type']}";
661 $view =
'page/components/list';
687 $list_type =
get_input(
'list_type',
'list');
690 'items' => $annotations,
693 'list_class' =>
'elgg-list-annotation',
695 'list_type' => $list_type,
696 'offset_key' =>
'annoff',
703 $vars[
'pagination'] =
false;
706 $view =
"page/components/{$vars['list_type']}";
708 $view =
'page/components/list';
734 $list_type =
get_input(
'list_type',
'list');
737 'items' => $relationships,
740 'list_class' =>
'elgg-list-relationship',
741 'full_view' =>
false,
742 'list_type' => $list_type,
743 'offset_key' =>
'reloff',
750 $vars[
'pagination'] =
false;
753 $view =
"page/components/{$vars['list_type']}";
755 $view =
'page/components/list';
785 $name = $relationship->relationship;
790 $relationship_views = [
792 "relationship/{$name}",
793 'relationship/default',
796 foreach ($relationship_views as
$view) {
833 $view =
'output/friendlytime';
862 $vars[
'show_add_form'] = $add_comment;
865 $default_id =
'comments';
867 $default_id .=
"-{$entity->guid}";
982 "river/{$type}/{$subtype}/{$action}",
983 "river/{$type}/{$subtype}/default",
984 "river/{$type}/{$action}",
985 "river/{$type}/default",
986 'river/elements/layout',
989 foreach ($river_views as
$view) {
1071 if (!isset($prefixes)) {
1076 $default_section =
'';
1079 foreach ($prefixes as $prefix) {
1114 if (isset(
$params[
'#html'])) {
1115 return (
string)
$params[
'#html'];
1118 if (empty(
$params[
'#type'])) {
1119 _elgg_services()->logger->error(__FUNCTION__ .
'(): $params["#type"] is required.');
1128 $hidden_types = [
'hidden',
'securitytoken'];
1135 $params[
'id'] =
'elgg-field-' . base_convert(mt_rand(), 10, 36);
1138 $make_special_checkbox_label =
false;
1151 $make_special_checkbox_label =
true;
1171 $element_vars = array_merge($split_params[
''], $split_params[
'#']);
1180 $label_vars = $element_vars;
1181 if (in_array(
$input_type, [
'checkboxes',
'radio'])) {
1183 unset($label_vars[
'id']);
1186 $element_vars[
'label'] =
elgg_view(
'elements/forms/label', $label_vars);
1189 $element_vars[
'help'] =
elgg_view(
'elements/forms/help', $element_vars);
1191 if ($make_special_checkbox_label) {
1194 unset($element_vars[
'label']);
1199 return elgg_view(
'elements/forms/field', $element_vars);
1342 if (!is_array(
$data)) {
1343 _elgg_services()->logger->error(
'"elgg.data" Event handlers must return an array. Returned ' . gettype(
$data) .
'.');
1348 if ($message_delay < 1) {
1356 'simplecache_enabled' => (int)
_elgg_services()->simpleCache->isEnabled(),
1360 'message_delay' => $message_delay * 1000,
1365 'interval' => (int)
_elgg_services()->csrf->getActionTokenTimeout() * 333,
1381 $user_object =
$user->toObject();
1382 $user_object->admin =
$user->isAdmin();
1384 $elgg[
'user'] = (array) $user_object;
1402 $current_view_type = null;
1410 if (isset($current_view_type)) {
1461 return _elgg_services()->views->renderDeprecatedView($view, $vars, $suggestion, $version);
elgg_get_current_language()
Get the current system/user language or 'en'.
if(!elgg_view_exists("plugins/{$plugin_id}/settings")) $form_vars
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
elgg_views_boot()
Initialize viewtypes on system boot event This ensures simplecache is cleared during upgrades...
getSubtype()
Get the entity subtype.
elgg_get_release()
Get the current Elgg release.
elgg_register_viewtype_fallback(string $viewtype)
Register a viewtype to fall back to a default view if a view isn't found for that viewtype...
if(empty($plugins)) $errors
elgg_view_river_item(\ElggRiverItem $item, array $vars=[])
Renders a human-readable representation of a river item.
elgg_view_layout(string $layout_name, array $vars=[])
Displays a layout with optional parameters.
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
elgg_require_css(string $view)
Register a CSS view name to be included in the HTML head.
$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_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
if(!$user||!$user->canDelete()) $name
getSubjectEntity()
Get the subject of this river item.
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
$relationship
Elgg default relationship view.
if(!$annotation instanceof ElggAnnotation) $time
if($vars['name']&&$vars['default']!==false) $input_vars
elgg_trigger_event_results(string $event, string $type, array $params=[], $returnvalue=null)
Triggers an event where it is expected that the mixed return value could be manipulated by event call...
elgg_view_tagcloud(array $options=[])
Create a tagcloud for viewing.
elgg_register_ajax_view(string $view)
Register a view to be available for ajax calls.
elgg_register_external_file(string $type, string $name, string $url, string $location= '')
Core registration function for external files.
elgg_view_title(string $title, array $vars=[])
Renders a title.
elgg_view_resource(string $name, array $vars=[])
Render a resource view.
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
elgg_get_viewtype()
Return the current view type.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
_elgg_has_rss_link()
Should the RSS view of this URL be linked to?
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
if(!$entity instanceof\ElggUser) $data
elgg_view_menu($menu, array $vars=[])
Render a menu.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Thrown when page is not accessible.
elgg_view_annotation_list(array $annotations, array $vars=[])
Returns a rendered list of annotations, plus pagination.
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
elgg_view_list_item($item, array $vars=[])
View an item in a list.
if(!empty($avatar)&&!$avatar->isValid()) elseif(empty($avatar)) if(!$owner->saveIconFromUploadedFile('avatar')) if(!elgg_trigger_event('profileiconupdate', $owner->type, $owner)) $view
elgg_view_page(string $title, string|array $body, string $page_shell= 'default', array $vars=[])
Assembles and outputs a full page.
elgg_get_view_extensions(string $view)
Get the views (and priorities) that extend a view.
elgg_import_esm(string $name)
Helper functions for external files like css/js.
elgg_view_relationship(\ElggRelationship $relationship, array $vars=[])
Returns a string of a rendered relationship.
elgg_view_entity(\ElggEntity $entity, array $vars=[])
Returns a string of a rendered entity.
elgg_register_esm(string $name, string $href)
Registers an ES module to the import map.
elgg_load_external_file(string $type, string $name)
Load an external resource for use on this page.
elgg_set_viewtype(string $viewtype= '')
Manually set the viewtype.
const ELGG_ENTITIES_ANY_VALUE
Constant to request the value of a parameter be ignored in elgg_get_*() functions.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
hasCapability(string $capability)
Checks a specific capability is enabled for the entity type/subtype.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
elgg_view_icon(string $name, array $vars=[])
View an icon glyph.
elgg_view_friendly_time($time, $time_updated=null)
Displays a UNIX timestamp in a friendly way.
elgg_unregister_ajax_view(string $view)
Unregister a view for ajax calls.
elgg_view_deprecated(string $view, array $vars, string $suggestion, string $version)
Display a view with a deprecation notice.
if($email instanceof\Elgg\Email) $object
elgg_view_entity_list(array $entities, array $vars=[])
Returns a rendered list of entities with pagination.
$ts
CSRF security token view for use with secure forms.
elgg_view_url(string $href, string $text=null, array $options=[])
Helper function for outputting urls.
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
getType()
Returns the entity type.
getView()
Get the view used to display this river item.
_elgg_services()
Get the global service provider.
elgg_view_relationship_list(array $relationships, array $vars=[])
Returns a rendered list of relationships, plus pagination.
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
elgg_view_annotation(\ElggAnnotation $annotation, array $vars=[])
Returns a string of a rendered annotation.
elgg_get_simplecache_url(string $view)
Get the URL for the cached view.
elgg_unregister_rss_link()
Remove the RSS icon link and link element from the head.
_elgg_view_under_viewtype(string $view, array $vars, string $viewtype)
Render a view while the global viewtype is temporarily changed.
elgg_is_xhr()
Checks whether the request was requested via ajax.
elgg_extend_view(string $view, string $view_extension, int $priority=501)
Extends a view with another view.
elgg_view_comments(\ElggEntity $entity, bool $add_comment=true, array $vars=[])
Returns rendered comments and a comment form for an entity.
elgg_unextend_view(string $view, string $view_extension)
Unextends a view.
elgg_view_exists(string $view, string $viewtype= '', bool $recurse=true)
Returns whether the specified view exists.
_elgg_get_js_page_data(array $params=[])
Get the initial contents of "elgg" client side.
_elgg_split_vars(array $vars=[], array $prefixes=null)
Split array of vars into subarrays based on property prefixes.
if(!empty($title)&&!empty($icon_name)) if(!empty($title)) if(!empty($menu)) if(!empty($header)) if(!empty($body)) $contents
getURL()
Gets the URL for this entity.
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
getDisplayName()
Get the entity's display name.
elgg_get_form_footer()
Returns currently set footer, or false if not in the form rendering stack.
elgg_register_rss_link()
Include the RSS icon link and link element in the head.
getObjectEntity()
Get the object of this river item.