Using a base class for theme objects confuses the enum class mapping

Created on 20 May 2024, 26 days ago
Updated 4 June 2024, 12 days ago

Problem/Motivation

I want a base class for simple theme objects that don't have any logic to them, e.g

abstract class ThemeObjectBase {

  use DrupalObjectTrait;

  final private function __construct() {
  }

  public static function create(): static {
    return new static();
  }

  public function __invoke(): mixed {
    return $this->pintoBuild(static function (mixed $build): mixed {
      return $build;
    });
  }

}

and

#[ThemeDefinition([])]
final class BackToTop extends ThemeObjectBase {

}

This results in the pinto mapping getting confused and uses the first theme object rendered following this pattern for all subsequent theme objects.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia acbramley

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024