72 if (
$index <= $num_columns) {
77 foreach ($column_widgets as $column_widget) {
85 for ($column_index = 1; $column_index <=
$num_columns; $column_index++) {
88 $widgets_content =
'';
89 foreach ($column_widgets as
$widget) {
96 'register_rss_link' =>
false,
103 "elgg-widget-col-{$column_index}",
105 'data-widget-column' => $column_index,
106 ], $widgets_content);
110 'class' =>
'elgg-widgets-grid',
117 'elgg-layout-widgets',
118 "elgg-layout-widgets-{$context}",
120 'data-page-owner-guid' =>
$owner->guid,
if(empty($page_owner)||$owner->guid!==$page_owner->guid) $widgets
if(!empty($widgets)) if(!isset($widgets[$num_columns])) foreach($widgets as $index=> $column_widgets) $grid
$num_columns
Elgg widgets layout.
elgg_set_page_owner_guid(int $guid)
Set the guid of the entity that owns this page.
if(!$owner instanceof\ElggEntity) $context
elgg_get_context()
Get the current context.
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_pop_context()
Removes and returns the top context string from the stack.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg_import_esm(string $name)
Helper functions for external files like css/js.
elgg_view_entity(\ElggEntity $entity, array $vars=[])
Returns a string of a rendered entity.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_push_context(string $context)
Push a context onto the top of the stack.
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.