Skip to content

Instantly share code, notes, and snippets.

@slavik112211
Created October 16, 2012 18:56
Show Gist options
  • Save slavik112211/3901225 to your computer and use it in GitHub Desktop.
Save slavik112211/3901225 to your computer and use it in GitHub Desktop.
<?php
namespace BVD\PetroleumBundle\Util;
use Lexik\Bundle\FormFilterBundle\Filter\Transformer\FilterTransformerInterface;
use Symfony\Component\Form\FormInterface;
class FilterEntityNameTransformer implements FilterTransformerInterface
{
/**
* {@inheritDoc}
* @see Lexik\Bundle\FormFilterBundle\Filter\Transformer.FilterTransformerInterface::transform()
*/
public function transform(FormInterface $form)
{
$values = array('value' => $form->getData());
$values['field'] = $form->getConfig()->getOptions()['association_field'];
return $values;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment