本文整理汇总了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');
}
示例2: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefined(['product'])->setAllowedTypes('product', ProductInterface::class);
}
示例3: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(['cascade_validation' => true]);
parent::configureOptions($resolver);
}
示例4: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['customer' => null]);
}
示例5: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefault('rounding_mode', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN);
}
示例6: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['configuration_type' => ItemTotalRuleChecker::TYPE]);
}
示例7: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefined(['criteria'])->setAllowedTypes('criteria', 'array');
}
示例8: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefault('zone_type', ZoneInterface::TYPE_COUNTRY);
}
示例9: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(array('customer' => null, 'cascade_validation' => true));
}
示例10: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefined(['configuration_type']);
}
示例11: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['rating_steps' => 5]);
}
示例12: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['master' => false]);
}
示例13: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefaults(['rating_steps' => 5, 'cascade_validation' => true]);
}