Skip to content

Add MagicControl for dynamic component creation#46

Open
f3l1x wants to merge 1 commit intomasterfrom
claude/add-magic-control-01F7KYCxFWMb2vedB5hzvnen
Open

Add MagicControl for dynamic component creation#46
f3l1x wants to merge 1 commit intomasterfrom
claude/add-magic-control-01F7KYCxFWMb2vedB5hzvnen

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Dec 13, 2025

Add MagicControl that allows dynamic creation of subcomponents based on registered factories configured via Neon.

  • Add MagicControl class for component registry and factory management
  • Add MagicComponents trait for presenters/controls
  • Add ApplicationExtension DI extension for Neon configuration
  • Add nette/di as required dependency
  • Add comprehensive tests and documentation

Usage in Neon:
application: components: latestArticles: App\LatestArticlesControlFactory

Usage in Latte:
{control magic-latestArticles} {control magic-latestArticles, count: 10}

Closes #2

Add MagicControl that allows dynamic creation of subcomponents based on
registered factories configured via Neon.

- Add MagicControl class for component registry and factory management
- Add MagicComponents trait for presenters/controls
- Add ApplicationExtension DI extension for Neon configuration
- Add nette/di as required dependency
- Add comprehensive tests and documentation

Usage in Neon:
  application:
    components:
      latestArticles: App\LatestArticlesControlFactory

Usage in Latte:
  {control magic-latestArticles}
  {control magic-latestArticles, count: 10}

Closes #2
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

Successfully merging this pull request may close these issues.

ComponentManager

2 participants