Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By amitaibu on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x-1.x
Introduced in version:
7.x-1.0-RC6
Issue links:
Description:
Return values from getReferencableEntities() are now keyed by bundle.
When using "select" widget, this will result with optgroup for all entity-types, unless there is only a single bundle in the result.
Before
$handler->getReferencableEntities() ;
// This would result in a flat array.
array(
1 => 'foo',
2 => 'bar',
);
After
$handler->getReferencableEntities() ;
// This would result in array keyed by bundle.
array(
'article' => array(
1 => 'foo',
),
'page' => array(
2 => 'bar',
),
);
Impacts:
Module developers