By berdir on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0
Description:
The ability to define a label callback in the entity type definition has been deprecated.
Entity types that have a dynamic label can instead override the label method.
Before
* label_callback = "user_format_name",
function user_format_name(AccountInterface $account) {
return $account->getDisplayName();
}
After
/**
* {@inheritdoc}
*/
public function label() {
return $this->getDisplayName();
}
Impacts:
Module developers