Skip to main content

31 posts tagged with "Symfony"

View All Tags

Adding a media reference to a Sulu entity

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 4 min read
Stephan Hochdörfer
Head of IT Business Operations

For a current task, I needed to add a media reference to a custom Sulu entity. At first, it seemed like an easy task but I had issues getting the media image to render in the list view. Thanks to the fabulous Sulu core team and their Slack community, I quickly got some pointers on how to deal with the issue.

Adding an entity reference to a Sulu entity

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 3 min read
Stephan Hochdörfer
Head of IT Business Operations

Let's assume you have a sulu entity App\Entity\MyEntity defined and you want to add a reference to this other entity App\Entity\OtherEntity to it. Follow this blog post along to find out which steps you have to take.

Silex, Twig and Translation support

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

As I have written a couple of days ago, we are using Silex and Twig to build a small application for one of our customers. Since the project was in need of I18N support, we set up the TranslationServiceProvider with the Symfony/Translation component as the Silex documentation advised. Unfortunately I was not able to find a Twig extension allowing us to translate static content within a Twig template, so it was the time to jump in and develop an extension on my own and publish it on github. Simply drop the files in your vendors directory and include the lib/bitExpert/Silex/Autoloader.php file within your application and execute the steps listed below: