3 Einträge mit diesem Tag
I needed a Server-Based mobile switch for my symfony-project. The solutions I found all used a workaround with setting the sf_format parameter to a specific mobile version. But what if you are using sf_format already for different view-types?
My Solution will use the Extension, so you can have multiple view-templates like:
I hope this is useful for somebdody! You might want to specify more parameters or make this a filter.
Working with HTML5 Audio Components, i realized Internet Explorer 9, Google Chrome and Mobile Safari, do not send Domain Cookies when requesting a playable File, which required the necessity to import the sessionid before initalize session management.
I created my own SessionStorage class and adjusted the corresponding routes to have an session_id parameter.
Whereas sessionid is the routing parameter.
Another Doctrine2 Post. This time we're taking a look on Event Listeners/Subscribers. Event Listeners are a real powerful thing in Doctrine2. Besides LifeCycleCallbacks they can be used if you'll want to scan through your Entity i.e. for specialized standard field. Also implementing a global Versionable behaviour (since that is no longer a native Doctrine behaviour) ist very easy to do inside Event Listeners.
My motivation for this quick blog post is just to give people a gist how to use EventListeners because the documentation is -again- a pain in the ass.
Im just using onFlush() here, since preUpdate() is somehow not called by SonataDoctrineORMAdminBundle which i'm using to mainly manage my Entities.
Lets start by creating a EventListener in My/Bundle/Listener/MyEventListener.php
Now all that is left to do is to attach the Event Listener to DI. If you're using Symfony2 you'll just need to update your app/config/config.yml
For further information feel free to take a look at the beautiful Doctrine2 Documentation, which I obviously love so much.
? PRDCTVTY_BEAhttp://t.co/wUo1VU3FRcR#NowPlayingng about 15 hours ago
Why are Lybian TLDs so expensive? 1 day ago