当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractResourceType::configureOptions方法代码示例

本文整理汇总了PHP中Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType::configureOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractResourceType::configureOptions方法的具体用法?PHP AbstractResourceType::configureOptions怎么用?PHP AbstractResourceType::configureOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType的用法示例。


在下文中一共展示了AbstractResourceType::configureOptions方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(array('validation_groups' => function (Options $options) {
         if ($options['shippable']) {
             $this->validationGroups[] = 'shippable';
         }
         return $this->validationGroups;
     }, 'shippable' => false))->setAllowedTypes('shippable', 'bool');
 }
开发者ID:benakacha,项目名称:Sylius,代码行数:13,代码来源:AddressType.php

示例2: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefined(['product'])->setAllowedTypes('product', ProductInterface::class);
 }
开发者ID:Niiko,项目名称:Sylius,代码行数:8,代码来源:AddToCartType.php

示例3: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     $resolver->setDefaults(['cascade_validation' => true]);
     parent::configureOptions($resolver);
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:8,代码来源:StaticContentType.php

示例4: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['customer' => null]);
 }
开发者ID:NeverResponse,项目名称:Sylius,代码行数:8,代码来源:AddressType.php

示例5: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefault('rounding_mode', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN);
 }
开发者ID:Niiko,项目名称:Sylius,代码行数:8,代码来源:ExchangeRateType.php

示例6: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['configuration_type' => ItemTotalRuleChecker::TYPE]);
 }
开发者ID:sylius,项目名称:sylius,代码行数:8,代码来源:PromotionRuleType.php

示例7: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefined(['criteria'])->setAllowedTypes('criteria', 'array');
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:8,代码来源:ShippingStepType.php

示例8: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefault('zone_type', ZoneInterface::TYPE_COUNTRY);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:8,代码来源:ZoneType.php

示例9: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(array('customer' => null, 'cascade_validation' => true));
 }
开发者ID:aleherse,项目名称:Sylius,代码行数:8,代码来源:AddressingStepType.php

示例10: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefined(['configuration_type']);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:8,代码来源:AbstractConfigurationType.php

示例11: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['rating_steps' => 5]);
 }
开发者ID:sylius,项目名称:sylius,代码行数:8,代码来源:ReviewType.php

示例12: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['master' => false]);
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:8,代码来源:VariantType.php

示例13: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['rating_steps' => 5, 'cascade_validation' => true]);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:8,代码来源:ReviewType.php


注:本文中的Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType::configureOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。