Skip to main content
14 events
when toggle format what by license comment
Apr 10, 2023 at 7:25 comment added Bhavik Hirani You can convert your Twig code to PHP or TPL here : easycodetools.com/tool/twig-to-php-converter here, is online twig to PHP converter ( online twig to TPL converter )
Oct 24, 2017 at 7:03 history edited i am batman CC BY-SA 3.0
added 4 characters in body
Oct 24, 2017 at 4:34 history edited avpaderno CC BY-SA 3.0
improved punctuation and spelling
Oct 23, 2017 at 14:23 comment added Clive @Kevin It's understandable on questions, downvotes are supposed to be given for a lack of effort. No offence aimed at anyone in particular, but it's quite rare to see good research presented in a question. So plenty of questions with downvotes is to be expected. Answers not so much, feel free to raise a flag if you want us to see if the system has spotted any unusual activity
Oct 23, 2017 at 13:20 comment added Kevin Is there a bot or something that rakes this site and downvotes everything? Seeing a ton of downvotes lately on questions and answers.
Oct 23, 2017 at 13:11 answer added Kevin timeline score: 3
Oct 23, 2017 at 12:48 comment added Clive Not directly, but you can write extensions to expose them, yes
Oct 23, 2017 at 12:48 answer added florian_drupal timeline score: 2
Oct 23, 2017 at 12:48 history edited i am batman CC BY-SA 3.0
deleted 13 characters in body
Oct 23, 2017 at 12:43 comment added user21641 You could plug-in the phptemplate engine as service. Have a look at hook_extensions() and hook_theme(). But I would not recommend this at all. You should do all logic in preprocess functions and template should solely for displaying the information without any data manipulation. The old phptemplateengine-way was really bad.
Oct 23, 2017 at 12:39 comment added i am batman So can I call php functions from the twig language? @Clive
Oct 23, 2017 at 11:52 comment added Clive No you can’t write php in a Twig file, it’s a different language. The “annoying” language is Twig itself, nothing to do with Symfony other than Symfony happens to prefer it (not least because it’s miles ahead of old php-only templates). If you need php logic to prepare variables for a template file, that’s what preprocess functions were made for, same as D7
Oct 23, 2017 at 11:43 review First posts
Oct 23, 2017 at 12:01
Oct 23, 2017 at 11:40 history asked i am batman CC BY-SA 3.0