TC
Twill CMSluciusvorenus_

[3.0.0] componentBlock overriding getBlockIcon doesn't seem to work?

(Successfully changed the title by overriding it's static function) Checked twill:list:icon for the wysiwyg_header icon and added the following to App\View\Components\Twill\Blocks\Article\Header.php public static function getBlockIcon(): string { return 'wysiwyg_header'; } No change in icon, and, in fact, if I comment out that function locally, and change the parent function in TwillBlockComponent.php (😱 ), it doesn't have any effect either (with any different icons (haven't tried them all!)) Can't see what I've missed.
L
luciusvorenus_•393d ago
@ifox.dev Gentle bump in your direction when you have a minute. Not getting why it doesn't work!
A
agnonym•393d ago
Hi @luciusvorenus_ @ifox.dev , I just had the same problem trying to create a Block class. What I think is getBlockIcon() is never called, I just made a PR: https://github.com/area17/twill/pull/2238
GitHub
~ | Block::forComponent(): missing call to $componentClass::getBloc...
Using TwillBlockComponent for a Block, the static method getBlockIcon() is never called, so its icon is always the default 'text'
L
luciusvorenus_•393d ago
Thanks for looking into that!