Convert views hooks to events

Created on 25 April 2014, almost 11 years ago
Updated 18 October 2024, 6 months ago

Problem/Motivation

Views has quite a few hooks that are invoked during the lifecycle of a view, when views cache is invalidated, when a view is analysed, etc.. Most hooks have now been removed in D8, we should follow suit here and convert views to dispatch events instead of invoking hooks. People can then do what they need to with views in an OO fashion.

Proposed resolution

Convert hooks to events. Not touching views data, and probably views query/form substitutions too - as they are more of a discovery/collection mechanism. Maybe something like #1972304: Add a HookEvent or 🌱 Allow module services to specify hooks Needs work could help with those?

Remaining tasks

All things.

User interface changes

None

API changes

Replacement of most views hooks with corresponding events.

📌 Task
Status

Closed: duplicate

Version

11.0 🔥

Component

views.module

Created by

🇬🇧United Kingdom damiankloip

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024