Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291122

Convert /forum and /forum/% to new routing system, convert Forum to subclass Term entity type

$
0
0

Problem/Motivation

Brings forum module in to line with latest API improvements in core.
By subclassing Term entity type with Forum entity type we can move much of the custom code surrounding forum editing, listing, loading etc into entity controllers (form, render, storage) allowing contrib to swap these out for their own implementation. This removes much of the 'too basic for any real use case, too rigid to be customised' problems normally levelled at core modules.

Proposed resolution

Create a Forum entity type as a sub class of Term
Remove forum_forum_load logic into the Forum entity storage controller
Convert /forum and /forum/% to new routing system.

Remaining tasks

Reviews
Follow ups (see related issues)

User interface changes

None

API changes

forum_forum_load() removed, just use entity_load('forum', $tid); instead.
To load the forum index (shown at /forum) which is a psuedo entity, use Drupal::service('plugin.manager.entity')->getController('forum')->getIndex().


Viewing all articles
Browse latest Browse all 291122

Trending Articles