title: symfony2 service array parameters. How to get value based on key
body: <p>I'm creating new invoice form, which includes select input with some constant values.
  I've made it through services:</p>
  
  <p><strong>services.yml</strong></p>
  
  <pre><code>parameters:
      stawki_vat:
          0: 0%
          5: 5%
          8: 8%
          23: 23%
          zw: zw.
  services:
      acme.form.type.stawki_vat:
          class: Acme\FakturyBundle\Form\Type\StawkiVatType
          arguments:
              - "%stawki_vat%"
          tags:
              - { name: form.type, alias: stawki_vat }
  </code></pre>
  
  <p><strong>StawkiVatType.php</strong></p>
  
  <pre><code>class StawkiVatType extends AbstractType
  {
      private $stawkiVatChoices;
  
      public function __construct(array $stawkiVatChoices) {
          $this-&gt;stawkiVatChoices = $stawkiVatChoices;
      }
  
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(array(
              'choices' =&gt; $this-&gt;stawkiVatChoices,
          ));
      }
  
      public function getParent()
      {
          return 'choice';
      }
  
      public function getName()
      {
          return 'stawki_vat';
      }
  }
  </code></pre>
  
  <p><strong>TowarType.php</strong></p>
  
  <pre><code>class TowarType extends AbstractType
  {
      /**
   * @param FormBuilderInterface $builder
   * @param array $options
   */
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
      $builder
          -&gt;add('nazwa_towar', null, array('label' =&gt; 'Nazwa towaru/usługi'))
          -&gt;add('cena_netto', null, array(
              'label' =&gt; 'Cena netto'
          ))
          -&gt;add('vat', 'stawki_vat', array(
              'attr' =&gt; array('class' =&gt; 'styled'),
              'label' =&gt; 'Stawka VAT',
          ))
      ;
  }
  </code></pre>
  
  <p>In form, everything works perfect.
  But now, I want to get a value stored in database (key of stawki_vat) and show a value of stawki_vat array.</p>
  
  <p>How to achieve this in simple way?</p>