Allow objects in theme definitions

Created on 6 March 2024, 11 months ago

Problem/Motivation

Solve objects in theme definition methods.

Error:

Unable to dump a service container if a parameter is an object without _serviceId.

Steps to reproduce

E.g

final class MyThemeObject {

  #[ThemeDefinition]
  public static function theme(): array {
    return [
      'variables' => [
        'attributes' => new \Drupal\Core\Template\Attribute(),
      ],
    ];
  }

}

Proposed resolution

Unknown

Remaining tasks

Investigate, fix

User interface changes

Nil

API changes

Nil

Data model changes

Nil

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024