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


PHP Type\AbstractResourceType类代码示例

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


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

示例1: __construct

 /**
  * @param string $dataClass
  * @param array $validationGroups
  * @param string $attributeChoiceType
  * @param RepositoryInterface $attributeRepository
  * @param FormTypeRegistryInterface $formTypeTypeRegistry
  */
 public function __construct($dataClass, array $validationGroups, $attributeChoiceType, RepositoryInterface $attributeRepository, FormTypeRegistryInterface $formTypeTypeRegistry)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->attributeChoiceType = $attributeChoiceType;
     $this->attributeRepository = $attributeRepository;
     $this->formTypeRegistry = $formTypeTypeRegistry;
 }
开发者ID:sylius,项目名称:sylius,代码行数:14,代码来源:AttributeValueType.php

示例2: setDefaultOptions

 /**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     parent::setDefaultOptions($resolver);
     $resolver->replaceDefaults(array('empty_data' => function (FormInterface $form) {
         return new $this->dataClass($form->get('product')->getData(), $form->get('type')->getData());
     }));
 }
开发者ID:Avazanga1,项目名称:Sylius,代码行数:10,代码来源:ProductAssociationType.php

示例3: __construct

 /**
  * @param string $dataClass
  * @param array $validationGroups
  * @param ServiceRegistryInterface $calculatorRegistry
  * @param ServiceRegistryInterface $checkerRegistry
  * @param FormRegistryInterface $formRegistry
  */
 public function __construct($dataClass, array $validationGroups, ServiceRegistryInterface $calculatorRegistry, ServiceRegistryInterface $checkerRegistry, FormRegistryInterface $formRegistry)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->calculatorRegistry = $calculatorRegistry;
     $this->checkerRegistry = $checkerRegistry;
     $this->formRegistry = $formRegistry;
 }
开发者ID:TheMadeleine,项目名称:Sylius,代码行数:14,代码来源:ShippingMethodType.php

示例4: __construct

 /**
  * @param string $dataClass
  * @param array $validationGroups
  * @param string $shippingMethodTranslationType
  * @param ServiceRegistryInterface $calculatorRegistry
  * @param ServiceRegistryInterface $checkerRegistry
  * @param FormTypeRegistryInterface $formTypeRegistry
  * @param EventSubscriberInterface $buildShippingMethodFormSubscriber
  */
 public function __construct($dataClass, array $validationGroups, $shippingMethodTranslationType, ServiceRegistryInterface $calculatorRegistry, ServiceRegistryInterface $checkerRegistry, FormTypeRegistryInterface $formTypeRegistry, EventSubscriberInterface $buildShippingMethodFormSubscriber)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->shippingMethodTranslationType = $shippingMethodTranslationType;
     $this->calculatorRegistry = $calculatorRegistry;
     $this->checkerRegistry = $checkerRegistry;
     $this->formTypeRegistry = $formTypeRegistry;
     $this->buildShippingMethodFormSubscriber = $buildShippingMethodFormSubscriber;
 }
开发者ID:sylius,项目名称:sylius,代码行数:18,代码来源:ShippingMethodType.php

示例5: 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

示例6: setDefaultOptions

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

示例7:

 /**
  * @param string $dataClass
  * @param array  $validationGroups
  * @param string $subject
  */
 function __construct($dataClass, array $validationGroups, $subject)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->subject = $subject;
 }
开发者ID:Strontium-90,项目名称:Sylius,代码行数:10,代码来源:ArchetypeType.php

示例8: configureOptions

 /**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefault('rounding_mode', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN);
 }
开发者ID:Niiko,项目名称:Sylius,代码行数:8,代码来源:ExchangeRateType.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(['product'])->setAllowedTypes('product', ProductInterface::class);
 }
开发者ID:Niiko,项目名称:Sylius,代码行数:8,代码来源:AddToCartType.php

示例11: configureOptions

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

示例12: __construct

 /**
  * @param string              $dataClass
  * @param array               $validationGroups
  * @param RepositoryInterface $customerRepository
  */
 public function __construct($dataClass, array $validationGroups, RepositoryInterface $customerRepository)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->customerRepository = $customerRepository;
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:10,代码来源:CustomerSimpleRegistrationType.php

示例13: __construct

 /**
  * @param string $dataClass
  * @param array $validationGroups
  * @param MetadataInterface $metadata
  */
 public function __construct($dataClass, array $validationGroups = [], MetadataInterface $metadata)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->metadata = $metadata;
 }
开发者ID:loic425,项目名称:Sylius,代码行数:10,代码来源:UserType.php

示例14: setDefaultOptions

 /**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     $resolver->setDefaults(array('cascade_validation' => true));
     parent::setDefaultOptions($resolver);
 }
开发者ID:Strontium-90,项目名称:Sylius,代码行数:8,代码来源:MenuType.php

示例15: setDefaultOptions

 /**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     parent::setDefaultOptions($resolver);
     $resolver->setOptional(array('criteria'))->setAllowedTypes(array('criteria' => array('array')));
 }
开发者ID:Strontium-90,项目名称:Sylius,代码行数:8,代码来源:ShippingStepType.php


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