Symfony 2.5 - 从监听器获取表单字段选项

Having form like:

class MyForm extends AbstractType {
    public function buildForm(FormBuilderInterface $builder, array $options){
        $builder->add('title', 'text', [
            'required'    => true,
            'trim'        => true,
            'constraints' => [
                new Constraints\NotBlank(),
                new Constraints\Length([
                    'min' => 20,
                    'max' => 255,
                ]),
            ]
        ]);

        $builder->addEventSubscriber(new StripWhitespaceListener());
    }

}

and following event subscriber

class StripWhitespaceListener implements EventSubscriberInterface
{
    /** {@inheritdoc} */
    public static function getSubscribedEvents()
    {
        return [
            FormEvents::PRE_SUBMIT => 'onPreSubmit'
        ];
    }

    /**
     * @param FormEvent $event
     */
    public function onPreSubmit(FormEvent $event)
    {
        (something something)
    }
}

I would like to check if title field has trim option set to true inside onPreSubmit method of StripWhitespaceListener.

How can I do that?

Found the solution:

$event->getForm()->get('title')->getConfig()->getOption('trim')