Skip to content

Instantly share code, notes, and snippets.

View cybernet's full-sized avatar
😇
There is not a righteous man on Earth who does what is right and never sins

cybernet cybernet

😇
There is not a righteous man on Earth who does what is right and never sins
  • /usr/sbin/mysqld
View GitHub Profile
@cybernet
cybernet / ContextualOptionsFormListener.php
Created December 7, 2018 19:30 — forked from Raphhh/ContextualOptionsFormListener.php
Symfony form: set options according to the data
<?php
namespace AppBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
class ContextualOptionsFormListener implements EventSubscriberInterface
{
/**