Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder Blocks are instantiated during registration #141

Open
Z3d0X opened this issue Feb 22, 2024 · 1 comment
Open

Builder Blocks are instantiated during registration #141

Z3d0X opened this issue Feb 22, 2024 · 1 comment

Comments

@Z3d0X
Copy link
Owner

Z3d0X commented Feb 22, 2024

Problem

This getName() method is called during block registration

public static function getName(): string
{
return static::getBlockSchema()->getName();
}

$this->pageBlocks->put($pageBlock::getName(), $pageBlock);

Potential Solution

A potential viable solution might be to Explicitly set a name like in Layouts

protected static ?string $name;
public static function getName(): string
{
return static::$name;
}

make:page-block could auto to generate $name.

This would be a breaking a change, since existing application would need to explicitly set the $name.

Other ideas are welcome

@Z3d0X
Copy link
Owner Author

Z3d0X commented Feb 22, 2024

This might also be the root cause of #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant