/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolverInterface $optionsResolver)
 {
     parent::configureOptions($optionsResolver);
     $optionsResolver->setDefaults(array('slugify' => true));
     $newApi = method_exists($optionsResolver, 'setDefined');
     if ($newApi) {
         $optionsResolver->setAllowedTypes('slugify', 'bool');
     } else {
         $optionsResolver->setAllowedTypes(array('slugify' => 'bool'));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $optionsResolver)
 {
     parent::configureOptions($optionsResolver);
     $optionsResolver->setDefault('date_format', 'Y-m-d');
     $slugifyNormalizer = function ($options, $value) {
         if (null !== $value) {
             @trigger_error('The slugify option of ' . __CLASS__ . ' is deprecated as of version 1.1 and will be removed in 2.0. Using it has no effect.', E_USER_DEPRECATED);
         }
     };
     $optionsResolver->setAllowedTypes('date_format', 'string');
     $optionsResolver->setDefined('slugify');
     $optionsResolver->setNormalizer('slugify', $slugifyNormalizer);
 }
 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolverInterface $optionsResolver)
 {
     parent::configureOptions($optionsResolver);
     $optionsResolver->setRequired(array('date_format'));
     $optionsResolver->setDefaults(array('date_format' => 'Y-m-d'));
     $slugifyNormalizer = function ($options, $value) {
         if (null !== $value) {
             @trigger_error('The slugify option of ' . __CLASS__ . ' is deprecated as of version 1.1 and will be removed in 2.0. Using it has no effect.', E_USER_DEPRECATED);
         }
     };
     if (method_exists($optionsResolver, 'setDefined')) {
         // new OptionsResolver API (Symfony 2.6+)
         $optionsResolver->setAllowedTypes('date_format', 'string');
         $optionsResolver->setDefined(array('slugify'));
         $optionsResolver->setNormalizer('slugify', $slugifyNormalizer);
     } else {
         // old API (Symfony <2.6)
         $optionsResolver->setAllowedTypes(array('date_format' => 'string'));
         $optionsResolver->setOptional(array('slugify'));
         $optionsResolver->setNormalizers(array('slugify' => $slugifyNormalizer));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $optionsResolver)
 {
     parent::configureOptions($optionsResolver);
     $optionsResolver->setDefault('slugify', true);
     $optionsResolver->setAllowedTypes('slugify', 'bool');
 }