Setup
Without Symfony Flex
PitchLiformBundle
needs to be activated in your Symfony application.
// config/bundles.php
return [
// ...
Pitch\Liform\PitchLiformBundle::class => ['all' => true],
];
Without Symfony Service Container
$resolver = new \Pitch\Liform\Resolver();
$resolver->setTransformer('text', new \Pitch\Liform\Transformer\StringTransformer());
$resolver->setTransformer('number', new \Pitch\Liform\Transformer\NumberTransformer());
/* ... */
$liform = new \Pitch\Liform\Liform($resolver);
$liform->addExtension(new \Pitch\Liform\Extension\ValueExtension());
$liform->addExtension(new \Pitch\Liform\Extension\LabelExtension());
/* ... */
return $liform;