218 return _elgg_services()->views->unextendView($view, $view_extension);
263 if (is_array($body)) {
271 if (!
$timer->hasEnded([
'build page'])) {
272 $timer->end([
'build page']);
275 $timer->begin([__FUNCTION__]);
280 array_shift(
$params[
'segments']);
286 if ($system_messages->count()) {
287 $messages = $system_messages->dumpRegister();
303 $vars[
'page_shell'] = $page_shell;
314 $timer->end([__FUNCTION__]);
329 $view =
"resources/{$name}";
375 if (!
$timer->hasEnded([
'build page'])) {
376 $timer->end([
'build page']);
379 $timer->begin([__FUNCTION__]);
383 array_shift(
$vars[
'segments']);
387 $vars[
'layout'] = $layout_name;
390 "page/layouts/{$layout_name}",
391 'page/layouts/default',
395 foreach ($layout_views as $layout_view) {
402 $timer->end([__FUNCTION__]);
465 unset(
$vars[
'menu_view']);
467 if (is_string(
$menu)) {
482 "navigation/menu/{$name}",
483 'navigation/menu/default',
528 $entity_type = $entity->
getType();
533 "{$entity_type}/{$entity_subtype}",
534 "{$entity_type}/default",
538 foreach ($entity_views as
$view) {
568 $entity_type = $entity->
getType();
612 $name = $annotation->name;
617 $annotation_views = [
619 "annotation/{$name}",
620 'annotation/default',
623 foreach ($annotation_views as
$view) {
661 $list_type =
get_input(
'list_type',
'list');
664 'items' => $entities,
665 'list_class' =>
'elgg-list-entity',
667 'pagination' =>
true,
668 'list_type' => $list_type,
677 $vars[
'pagination'] =
false;
680 $view =
"page/components/{$vars['list_type']}";
682 $view =
'page/components/list';
708 $list_type =
get_input(
'list_type',
'list');
711 'items' => $annotations,
714 'list_class' =>
'elgg-list-annotation',
716 'list_type' => $list_type,
717 'offset_key' =>
'annoff',
724 $vars[
'pagination'] =
false;
727 $view =
"page/components/{$vars['list_type']}";
729 $view =
'page/components/list';
755 $list_type =
get_input(
'list_type',
'list');
758 'items' => $relationships,
761 'list_class' =>
'elgg-list-relationship',
762 'full_view' =>
false,
763 'list_type' => $list_type,
764 'offset_key' =>
'reloff',
771 $vars[
'pagination'] =
false;
774 $view =
"page/components/{$vars['list_type']}";
776 $view =
'page/components/list';
806 $name = $relationship->relationship;
811 $relationship_views = [
813 "relationship/{$name}",
814 'relationship/default',
817 foreach ($relationship_views as
$view) {
854 $view =
'output/friendlytime';
883 $vars[
'show_add_form'] = $add_comment;
886 $default_id =
'comments';
888 $default_id .=
"-{$entity->guid}";
1003 "river/{$type}/{$subtype}/{$action}",
1004 "river/{$type}/{$subtype}/default",
1005 "river/{$type}/{$action}",
1006 "river/{$type}/default",
1007 'river/elements/layout',
1010 foreach ($river_views as
$view) {
1092 if (!isset($prefixes)) {
1097 $default_section =
'';
1100 foreach ($prefixes as $prefix) {
1135 if (!empty(
$params[
'#html'])) {
1139 if (empty(
$params[
'#type'])) {
1140 _elgg_services()->logger->error(__FUNCTION__ .
'(): $params["#type"] is required.');
1149 $hidden_types = [
'hidden',
'securitytoken'];
1156 $params[
'id'] =
'elgg-field-' . base_convert(mt_rand(), 10, 36);
1159 $make_special_checkbox_label =
false;
1172 $make_special_checkbox_label =
true;
1192 $element_vars = array_merge($split_params[
''], $split_params[
'#']);
1201 $label_vars = $element_vars;
1202 if (in_array(
$input_type, [
'checkboxes',
'radio'])) {
1204 unset($label_vars[
'id']);
1207 $element_vars[
'label'] =
elgg_view(
'elements/forms/label', $label_vars);
1210 $element_vars[
'help'] =
elgg_view(
'elements/forms/help', $element_vars);
1212 if ($make_special_checkbox_label) {
1215 unset($element_vars[
'label']);
1220 return elgg_view(
'elements/forms/field', $element_vars);
1360 'deps' => [
'jquery-ui/widgets/autocomplete'],
1365 'deps' => [
'elgg/touch_punch'],
1382 if ($message_delay < 1) {
1390 'elgg.config.message_delay' => $message_delay * 1000,
1393 'elgg.security.interval' => (int)
_elgg_services()->csrf->getActionTokenTimeout() * 333,
1394 'elgg.config.language' =>
_elgg_services()->config->language ?:
'en',
1408 if (!is_array(
$data)) {
1409 elgg_log(
'"elgg.data" Event handlers must return an array. Returned ' . gettype(
$data) .
'.',
'ERROR');
1430 '_data' => (object)
$data,
1435 $user_object =
$user->toObject();
1436 $user_object->admin =
$user->isAdmin();
1438 $elgg[
'user'] = (array) $user_object;
1456 $current_view_type = null;
1464 if (isset($current_view_type)) {
1515 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_define_js(string $name, array $config)
Helper functions for external files like css/js.
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_get_js_site_data()
Get the site data to be merged into "elgg" in elgg.js.
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
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(!$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_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
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_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_set_view_location(string $view, string $location, string $viewtype= '')
Set an alternative base location for a view.
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.
elgg_is_simplecache_enabled()
Is simple cache enabled.
getType()
Returns the entity type.
getView()
Get the view used to display this river item.
_elgg_services()
Get the global service provider.
elgg_register_simplecache_view(string $view_name)
Registers a view to simple cache.
elgg_view_relationship_list(array $relationships, array $vars=[])
Returns a rendered list of relationships, plus pagination.
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_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_get_simplecache_url(string $view, string $subview= '')
Get the URL for the cached view.
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.