By acbramley on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
The block_content_add_list theme hook and template are deprecated. You can use entity_add_list instead.
Before:
// Where $types is a list of BlockContentType entities.
$build = ['#theme' => 'block_content_add_list', '#content' => $types];
After:
// Where $bundles is an associative array keyed by the bundle machine name, with an array of values with keys label, description, and add_link.
$build = [
'#theme' => 'entity_add_list',
'#bundles' => $bundles,
];
See \Drupal\Core\Entity\Controller\EntityController::addPage
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...
Impacts:
Module developers