protected function doRender(&
$elements,
$is_root_call = FALSE
) { if (empty($elements)) { return '';
} if ($this->rendererConfig
['debug'
] === TRUE
) { $render_start =
microtime(TRUE
);
} if (!
isset($elements['#access'
]) &&
isset($elements['#access_callback'
])) { $elements['#access'
] =
$this->
doCallback('#access_callback',
$elements['#access_callback'
],
[$elements]);
} // Early-return nothing if user does not have access.
if (isset($elements['#access'
])) { // If #access is an AccessResultInterface object, we must apply its
// cacheability metadata to the render array.
if ($elements['#access'
] instanceof AccessResultInterface
) { $this->
addCacheableDependency($elements,
$elements['#access'
]);
if (!
$elements['#access'
]->
isAllowed()) { // Abort, but bubble new cache metadata from the access result.
$context =
$this->
getCurrentRenderContext();