Problem/Motivation

The display of entity usage relationships need to be customized based on user preferences

Proposed resolution

Create a module defined theme_hook on the local task controller that can be overridden by a custom module

Remaining tasks

  1. Add a custom theme hook that could be overwritten by a custom module
  2. Create a twig template in the module in templates/module-usage-table.twig.html
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

theloneliestmonk created an issue. See original summary.

jastraat’s picture

Status: Active » Needs review
jastraat’s picture

Title: Create module define theme_hook » Create a module-defined theme hook for the usage tab
jastraat’s picture

Status: Needs review » Reviewed & tested by the community

Tested using the following steps with the issue branch:

  1. Enabled the setting to override the controller for the usage tab.
  2. Copied the new twig template from the entity_usage_plus module into a templates/ directory in my custom module and make a small tweak to distinguish it.
  3. In the same custom module, used hook_theme_registry_alter() to set $theme_registry['entity_usage_plus_usage_table']['path'] to my module's version of the template file.
  4. The usage table was overwritten with my custom module version.
  5. Also confirmed that paging continued to work as expected in the table

Looks great!

jastraat’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.