php Sylius-Bundle-ResourceBundle-Form-Type-AbstractResourceType类(方法)实例源码

下面列出了php Sylius-Bundle-ResourceBundle-Form-Type-AbstractResourceType 类(方法)源码代码实例,从而了解它的用法。

作者:syliu    项目:syliu   
/**
  * @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;
 }

作者:Avazanga    项目:Syliu   
/**
  * {@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());
     }));
 }

作者:TheMadelein    项目:Syliu   
/**
  * @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;
 }

作者:syliu    项目:syliu   
/**
  * @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;
 }

作者:benakach    项目:Syliu   
/**
  * {@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');
 }

作者:nany    项目:Syliu   
/**
  * {@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'));
 }

作者:Strontium-9    项目:Syliu   
/**
  * @param string $dataClass
  * @param array  $validationGroups
  * @param string $subject
  */
 function __construct($dataClass, array $validationGroups, $subject)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->subject = $subject;
 }

作者:Niik    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefault('rounding_mode', NumberToLocalizedStringTransformer::ROUND_HALF_EVEN);
 }

作者:alehers    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(array('customer' => null, 'cascade_validation' => true));
 }

作者:Niik    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefined(['product'])->setAllowedTypes('product', ProductInterface::class);
 }

作者:NeverRespons    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefaults(['customer' => null]);
 }

作者:ReissClothin    项目:Syliu   
/**
  * @param string              $dataClass
  * @param array               $validationGroups
  * @param RepositoryInterface $customerRepository
  */
 public function __construct($dataClass, array $validationGroups, RepositoryInterface $customerRepository)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->customerRepository = $customerRepository;
 }

作者:loic42    项目:Syliu   
/**
  * @param string $dataClass
  * @param array $validationGroups
  * @param MetadataInterface $metadata
  */
 public function __construct($dataClass, array $validationGroups = [], MetadataInterface $metadata)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->metadata = $metadata;
 }

作者:Strontium-9    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     $resolver->setDefaults(array('cascade_validation' => true));
     parent::setDefaultOptions($resolver);
 }

作者:Strontium-9    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     parent::setDefaultOptions($resolver);
     $resolver->setOptional(array('criteria'))->setAllowedTypes(array('criteria' => array('array')));
 }

作者:ahmadrabi    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefined(['criteria'])->setAllowedTypes('criteria', 'array');
 }

作者:ahmadrabi    项目:Syliu   
/**
  * @param string $dataClass
  * @param array $validationGroups
  * @param EventSubscriberInterface $guestCustomerSubscriber
  */
 public function __construct($dataClass, array $validationGroups, EventSubscriberInterface $guestCustomerSubscriber)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->guestCustomerSubscriber = $guestCustomerSubscriber;
 }

作者:ReissClothin    项目:Syliu   
/**
  * {@inheritdoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     parent::configureOptions($resolver);
     $resolver->setDefault('zone_type', ZoneInterface::TYPE_COUNTRY);
 }

作者:Mangets    项目:Syliu   
/**
  * @param string $dataClass
  * @param array $validationGroups
  * @param DataMapperInterface $orderItemQuantityDataMapper
  */
 public function __construct($dataClass, array $validationGroups = [], DataMapperInterface $orderItemQuantityDataMapper)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->orderItemQuantityDataMapper = $orderItemQuantityDataMapper;
 }

作者:Strontium-9    项目:Syliu   
/**
  * Constructor.
  *
  * @param string                       $dataClass
  * @param array                        $validationGroups
  * @param CalculatorRegistryInterface  $calculatorRegistry
  * @param RuleCheckerRegistryInterface $checkerRegistry
  */
 public function __construct($dataClass, array $validationGroups, CalculatorRegistryInterface $calculatorRegistry, RuleCheckerRegistryInterface $checkerRegistry)
 {
     parent::__construct($dataClass, $validationGroups);
     $this->calculatorRegistry = $calculatorRegistry;
     $this->checkerRegistry = $checkerRegistry;
 }


问题


面经


文章

微信
公众号

扫码关注公众号