You are here

function drupal_pre_render_links in Drupal 8

Same name and namespace in other branches
  1. 7 includes/common.inc \drupal_pre_render_links()

Pre-render callback: Collects child links into a single array.

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Render\Element\Link::preRenderLinks() instead.

See also

https://www.drupal.org/node/2966725

1 string reference to 'drupal_pre_render_links'
FunctionsTest::testDrupalPreRenderLinksLegacy in core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
Test the use of drupal_pre_render_links() on a nested array of links.

File

core/includes/common.inc, line 783
Common functions that many Drupal modules will need to reference.

Code

function drupal_pre_render_links($element) {
  @trigger_error('drupal_pre_render_links() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\Render\\Element\\Link::preRenderLinks() instead. See https://www.drupal.org/node/2966725', E_USER_DEPRECATED);
  return Link::preRenderLinks($element);
}