Tutorial by Examples

Background: The Household entity includes a set of options, each of which is an entity that is managed in an admin backend. Each option has a boolean enabled flag. If a previously enabled option is set to disabled it will need to be persisted in later Household edits, but cannot be edited away. T...
->add('housing', EntityType::class, array( 'class' => 'AppBundle:Housing', 'choice_label' => 'housing', 'placeholder' => '', 'attr' => (in_array('Housing', $options['disabledOptions']) ? ['disabled' => 'disabl...
/** * Housing. * * @ORM\Table(name="housing") * @ORM\Entity */ class Housing { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ protected $id...

Page 1 of 1