67 if (
$index <= $num_columns) {
72 foreach ($column_widgets as $column_widget) {
79 for ($column_index = 1; $column_index <=
$num_columns; $column_index++) {
82 $widgets_content =
'';
83 foreach ($column_widgets as
$widget) {
90 'register_rss_link' =>
false,
95 'id' =>
"elgg-widget-col-{$column_index}",
100 ], $widgets_content);
104 'class' =>
'elgg-widgets-grid',
109 $result .=
elgg_view(
'graphics/ajax_loader', [
'id' =>
'elgg-widget-loader']);
112 'class' =>
'elgg-layout-widgets',
113 'data-page-owner-guid' =>
$owner->guid,
118 require([
'elgg/widgets'],
function (widgets) {
$num_columns
Elgg widgets layout.
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
elgg_view_entity(\ElggEntity $entity, array $vars=[])
Returns a string of a rendered entity.
elgg_pop_context()
Removes and returns the top context string from the stack.
elgg echo
Translates a string.
elgg require
Throw an error if the required package isn't present.
elgg_get_context()
Get the current context.
if(!$owner) if($owner->guid!=$page_owner->guid) $context
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
if($widgets) if(!isset($widgets[$num_columns])) foreach($widgets as $index=> $column_widgets) $grid
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_push_context($context)
Push a context onto the top of the stack.
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
get_entity($guid)
Loads and returns an entity object from a guid.