function template_preprocess_entity_add_list

Prepares variables for the list of available bundles.

Default template: entity-add-list.html.twig.

Parameters

array $variables: An associative array containing:

  • bundles: An array of bundles with the label, description, add_link keys.
  • add_bundle_message: The message shown when there are no bundles. Only available if the entity type uses bundle entities.

Deprecated

in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme().

See also

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

File

core/modules/system/system.module, line 95

Code

function template_preprocess_entity_add_list(&$variables) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme(). See https://www.drupal.org/node/3504125', E_USER_DEPRECATED);
  \Drupal::service(SystemThemeHooks::class)->preprocessEntityAddList($variables);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.