Skip to content

Automatically generated hooks' names #1

@jakubtobiasz

Description

@jakubtobiasz

Currently we have to write hooks' names by hand (optionally with using a parent hook's name passed along with other data). The idea is to generate a hook name based on the template name.

@SyliusAdmin/Security/login.html.twig -> sylius_admin.security.login
@SyliusAdmin/CatalogPromotion/header.html.twig -> sylius_admin.catalog_promotion.header
some_template.html.twig -> <predefined_via_configuration_prefix, by default: app>.some_template

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttwig hooksIssues and Pull Requests related to Twig Hooks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions