— tech du peupl

Language :

Language

Part 4 of 4.

Now that our setup is complete, let's try to actually use these ACLs in SonataAdminBundle dashboard.

— Read More

Part 3 of 4.

In this post, we will implement our news bundle and enhance our brand new Dashboard to handle these news.

— Read More

Part 2 of 4.

In this post, we will start our project by installing all we need.

— Read More

Part 1 of 4.

I promised some blog posts about what to do with SonataAdminBundle. Since then, I had a hard time making Sonata bundles work nicely with ACLs on my existing data. I will try to explain how to set ACLs to SonataAdminBundle's CRUD, and how to bind these ACLs to logged in users handled by FOSUserBundle through SonataUserBundle.

This guide was initially written for Symfony 2.1. Since then, things have changed, Symfony 2.3 has been released and is the first Symfony 2 LTS (Long-Term Support), so I decided to rewrite it for Sonata Bundles and Symfony 2.3. Not much has changed, though. Symfony 2.1 guide is still accessible.

We will consider a fake project, let's name it “tech news”. It will be a news bundle with the following requirements :

— Read More

Part 3 of 4.

In this post, we will implement our news bundle and enhance our brand new Dashboard to handle these news.

— Read More

Part 2 of 4.

In this post, we will start our project by installing all we need.

— Read More

Part 1 of 4.

I promised some blog posts about what to do with SonataAdminBundle. Since then, I had a hard time making Sonata bundles work nicely with ACLs on my existing data. I will try to explain how to set ACLs to SonataAdminBundle's CRUD, and how to bind these ACLs to logged in users handled by FOSUserBundle through SonataUserBundle.

We will consider a fake project, let's name it “tech news”. It will be a news bundle with the following requirements :

— Read More

It has been a few weeks only and already there is no coming back. I started using DuckDuckGo and have now made it my default search provider instead of Google. I still use Google from time to time, particularly for searches in French and for Google Images. Here is why I decided to take the leap after 10 years of using exclusively Google.

— Read More

Ligature Symbols, by japanese web designer Kazuyuki Motoyama, has a neat idea of typographic ligatures. Ligatures are used to display certain words as nice corresponding icons. Example : using this font would display the text camera + user = good like this :

ligature symbols

— Read More

How to set up a new Symfony 2.1 project using SonataAdminBundle, FOSUserBundle and SonataUserBundle. (Disclaimer : disclaimer is at the end of this post.)

First, let me say that Symfony, with these three bundles, is an incredibly useful base for lots of projects. FOSUserBundle provides user management. By default it will let you have a register form (for new users to register), a log in/out form, lost password form, etc. User management comes with group management, so that you can file users into groups, assign them different permissions, etc. SonataAdminBundle provides an admin interface to administrate your users and groups. It also creates a nice CRUD, with shiny nice jQuery options, everything wrapped in Bootstrap. SonataUserBundle makes the link between FOSUserBundle and SonataAdminBundle.

I will first create a new Symfony 2.1 project :
⚘ composer.phar create-project symfony/framework-standard-edition ./tech 2.1 

PRO-TIP :
If you haven't already done this and are tired of copying composer.phar in every new Symfony2 project, run this :
⚘ curl -s https://getcomposer.org/installer | sudo "php -- --install-dir=/usr/bin"
(Or do it in two separate steps, if you're suspicious. You have all right to be.)
It will allow you to run composer from anywhere : ⚘ composer.phar something something

Edit composer.json, add these dependencies to the "require" section :

— Read More