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

Added TwigStringColumn for simple inline templating #146

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

freezy-sk
Copy link
Contributor

This column introduces simple inline templating when you don't want to use TextColumn or don't want to create template files consisting of one line of code

->add('link', TwigStringColumn::class, [
    'template' => '<a href="{{ url(\'employee.edit\', {id: row.id}) }}">{{ row.firstName }} {{ row.lastName }}</a>',
])

@curry684
Copy link
Member

curry684 commented Apr 1, 2020

I like it. Could you add a snippet to the docs as well?

@curry684
Copy link
Member

@freezy-sk I'll merge this and tag a new version when it's conflict-free and has a doc snippet 👼

@freezy-sk freezy-sk force-pushed the twig-string-column branch from af917de to 7fd60b8 Compare June 26, 2020 16:51
@freezy-sk
Copy link
Contributor Author

@curry684 docs added and PR rebased on latest master

@curry684
Copy link
Member

Awesome, thanks!

@curry684 curry684 merged commit ecad024 into omines:master Jun 29, 2020
@freezy-sk freezy-sk deleted the twig-string-column branch June 30, 2020 07:20
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.

2 participants