1 layout.module layout_current_user_context()

Returns the current user account context, which is always available.

@since 1.17.5 Function added.

Return value

EntityLayoutContext: The layout context for the current user account.


core/modules/layout/layout.module, line 2117
The Layout module creates pages and wraps existing pages in layouts.


function layout_current_user_context() {
  $current_user_context = layout_create_context('user', array(
    'name' => 'current_user',
    'label' => t('Logged-in user account'),
    'locked' => TRUE,
    'usageType' => LayoutContext::USAGE_TYPE_SYSTEM,

  return $current_user_context;