By drunken monkey on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x-1.x
Introduced in version:
8.x-1.14
Issue links:
Description:
In the general effort to reduce the use of Drupalisms and bring Drupal more in line with the general PHP ecosystem, it has been decided to replace all hooks with corresponding events throughout this module.
Starting with Search API 8.x-1.14, all invoked hook implementations will trigger an E_USER_DEPRECATED warning, which will also mention the event to use instead.
It is expected that hooks will be removed from this module in preparation of the next major version (either 8.x-2.0 or 9.x-1.0). Module developers should adapt their code before then.
All events provided by this module are listed in \Drupal\search_api\Event\SearchApiEvents.
Impacts:
Module developers
Comments
Can anyone give an example
Can anyone give an example how can we use an Event to alter a field's value while indexing a node?
How to replace hooks with events
Here are some examples and resources: