Problem/Motivation

Some of the render callbacks used by RenderExampleController use dependencies that are obtained from \Drupal. Those callbacks can be implemented as service methods, which at last could use the DI container.

Proposed resolution

Move the pre-render, post-render, and the lazy render callbacks used by RenderExampleController in service methods. Those methods can be marked as trusted callbacks with an attribute, which means that RenderExampleController::trustedCallbacks() can be removed too.

Issue fork examples-3614698

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

avpaderno created an issue. See original summary.

avpaderno’s picture

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Assigned: Unassigned » avpaderno

avpaderno’s picture

Status: Active » Needs review

I also used a different example of form element plugin, since <marquee> is a deprecated tag.

  • avpaderno committed 7fbf257e on 5.0.x
    Issue #3614698: Move the render callbacks used by...

avpaderno’s picture

Assigned: avpaderno » Unassigned

  • avpaderno committed 3f277406 on main
    Issue #3614698: Move the render callbacks used by...
avpaderno’s picture

Status: Needs review » 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.