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


PHP FormBuilder::prependClientTransformer方法代码示例

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


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

示例1: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     if ($options['multiple']) {
         $builder->prependClientTransformer(new ModelsToArrayTransformer($options['choice_list']));
     } else {
         $builder->prependClientTransformer(new ModelToIdTransformer($options['choice_list']));
     }
 }
开发者ID:hhamon,项目名称:PropelBundle,代码行数:8,代码来源:ModelType.php

示例2: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     if ($options['multiple']) {
         $builder->addEventSubscriber(new MergeCollectionListener())->prependClientTransformer(new ModelsToArrayTransformer($options['choice_list']));
     } else {
         $builder->prependClientTransformer(new ModelToIdTransformer($options['choice_list']));
     }
 }
开发者ID:rozwell,项目名称:PropelBundle,代码行数:8,代码来源:ModelType.php

示例3: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     $builder->prependClientTransformer(new CategoriesCollectionTransformer($options['entityCategoryClass']))->addEventSubscriber(new CategoriesMergeCollectionListener());
     $registries = \CategoryRegistryUtil::getRegisteredModuleCategories($options['module'], $options['entity'], 'id');
     foreach ($registries as $registryId => $categoryId) {
         $builder->add('registry_' . $registryId, 'entity', array('class' => 'Zikula\\Core\\Doctrine\\Entity\\Category', 'property' => 'name', 'query_builder' => function (EntityRepository $repo) use($categoryId) {
             //TODO: (move to)/use own entity repository after CategoryUtil migration
             return $repo->createQueryBuilder('e')->where('e.parent = :parentId')->setParameter('parentId', (int) $categoryId);
         }));
     }
 }
开发者ID:planetenkiller,项目名称:core,代码行数:11,代码来源:CategoriesType.php

示例4: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     if ($options['multiple']) {
         $builder->prependClientTransformer(new CollectionToArrayTransformer());
     }
 }
开发者ID:richardmiller,项目名称:symfony,代码行数:6,代码来源:ModelType.php

示例5: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     $builder->prependClientTransformer(new ModelToIdTransformer($options['model_manager'], $options['class']));
 }
开发者ID:helmer,项目名称:SonataAdminBundle,代码行数:4,代码来源:ModelReferenceType.php

示例6: buildForm

 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilder $builder, array $options)
 {
     $builder->prependClientTransformer(new ModelsToArrayTransformer($options['choice_list']));
     $this->choices = $options['choice_list']->getChoices();
     unset($options['choices']);
 }
开发者ID:norfil,项目名称:AdmingeneratorGeneratorBundle,代码行数:9,代码来源:PropelDoubleListType.php

示例7: buildForm

 public function buildForm(FormBuilder $builder, array $options)
 {
     $builder->prependClientTransformer(new OneEntityToIdTransformer($this->registry->getEntityManager($options['em']), $options['class'], $options['property'], $options['query_builder']));
 }
开发者ID:gayalab,项目名称:ioformbundle,代码行数:4,代码来源:EntityIdType.php


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