Skip to content

Why use tokenParser instead of twig function? #6

Open
@ivoba

Description

@ivoba

I dont really understand what the benefit is of the tokenParser here, as it basically just mimiks an if clause, doesnt it?

However i can see some cons:

  • it needs a cache-clear, a twig function doesnt need a cache-clear when changing the config
  • it cant be used in if/else or tenary clauses
  • codewise its much more verbose

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions