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


PHP ChannelManager::getChannelChoices方法代码示例

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


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

示例1: validate

 /**
  * {@inheritdoc}
  */
 public function validate($value, Constraint $constraint)
 {
     $channels = $this->manager->getChannelChoices();
     if (0 === count($channels)) {
         throw new ConstraintDefinitionException('No channel is set in the application');
     }
     $constraint->choices = array_keys($channels);
     parent::validate($value, $constraint);
 }
开发者ID:ashutosh-srijan,项目名称:findit_akeneo,代码行数:12,代码来源:ChannelValidator.php

示例2: getChannelChoicesWithUserChannel

 /**
  * Get channel choices with user channel code first
  *
  * @return string[]
  */
 public function getChannelChoicesWithUserChannel()
 {
     $channelChoices = $this->channelManager->getChannelChoices();
     $userChannelCode = $this->getUserChannelCode();
     if (array_key_exists($userChannelCode, $channelChoices)) {
         return [$userChannelCode => $channelChoices[$userChannelCode]] + $channelChoices;
     }
     return $channelChoices;
 }
开发者ID:javiersantos,项目名称:pim-community-dev,代码行数:14,代码来源:UserContext.php

示例3: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return ['channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'select2' => true, 'label' => 'pim_base_connector.export.channel.label', 'help' => 'pim_base_connector.export.channel.help']], 'updatedCondition' => ['type' => 'choice', 'options' => ['required' => true, 'select2' => true, 'label' => 'pim_enhanced_connector.product_reader.updatedCondition.label', 'help' => 'pim_enhanced_connector.product_reader.updatedCondition.help', 'choices' => ['doNotApply' => 'pim_enhanced_connector.product_reader.updatedCondition.choices.doNotApply', 'fromDefinedDate' => 'pim_enhanced_connector.product_reader.updatedCondition.choices.fromDefinedDate', 'fromLastExecution' => 'pim_enhanced_connector.product_reader.updatedCondition.choices.fromLastExecution']]], 'updatedSince' => ['options' => ['required' => false, 'label' => 'pim_enhanced_connector.product_reader.updatedSince.label', 'help' => 'pim_enhanced_connector.product_reader.updatedSince.help']], 'enabledCondition' => ['type' => 'choice', 'options' => ['required' => true, 'select2' => true, 'help' => 'pim_enhanced_connector.product_reader.enabledCondition.help', 'label' => 'pim_enhanced_connector.product_reader.enabledCondition.label', 'choices' => ['onlyEnabled' => 'pim_enhanced_connector.product_reader.enabledCondition.choices.onlyEnabled', 'onlyDisabled' => 'pim_enhanced_connector.product_reader.enabledCondition.choices.onlyDisabled', 'doNotApply' => 'pim_enhanced_connector.product_reader.enabledCondition.choices.doNotApply']]], 'categorizationCondition' => ['type' => 'choice', 'options' => ['required' => true, 'select2' => true, 'help' => 'pim_enhanced_connector.product_reader.categorizationCondition.help', 'label' => 'pim_enhanced_connector.product_reader.categorizationCondition.label', 'choices' => ['onlyCategorized' => 'pim_enhanced_connector.product_reader.categorizationCondition.choices.onlyCategorized', 'onlyNonCategorized' => 'pim_enhanced_connector.product_reader.categorizationCondition.choices.onlyNonCategorized', 'doNotApply' => 'pim_enhanced_connector.product_reader.categorizationCondition.choices.doNotApply']]], 'completeCondition' => ['type' => 'choice', 'options' => ['required' => true, 'select2' => true, 'help' => 'pim_enhanced_connector.product_reader.completeCondition.help', 'label' => 'pim_enhanced_connector.product_reader.completeCondition.label', 'choices' => ['onlyComplete' => 'pim_enhanced_connector.product_reader.completeCondition.choices.onlyComplete', 'onlyUncomplete' => 'pim_enhanced_connector.product_reader.completeCondition.choices.onlyUncomplete', 'doNotApply' => 'pim_enhanced_connector.product_reader.completeCondition.choices.doNotApply']]]];
 }
开发者ID:axel-ducret,项目名称:EnhancedConnectorBundle,代码行数:7,代码来源:ProductReader.php

示例4: getConfigurationFields

 /**
  * Get fields for the twig
  *
  * @return array
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'help' => 'actualys_drupal_commerce_connector.export.channel.help', 'label' => 'actualys_drupal_commerce_connector.export.channel.label']]]);
 }
开发者ID:calin-marian,项目名称:DrupalCommerceConnectorBundle,代码行数:9,代码来源:ProductProcessor.php

示例5: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return ['channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'select2' => true, 'label' => 'pim_base_connector.export.channel.label', 'help' => 'pim_base_connector.export.channel.help']]];
 }
开发者ID:jacko972,项目名称:pim-community-dev,代码行数:7,代码来源:ProductToFlatArrayProcessor.php

示例6: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), array('channel' => array('type' => 'choice', 'options' => array('choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'select2' => true, 'label' => 'pim_base_connector.export.channel.label', 'help' => 'pim_base_connector.export.channel.help'))));
 }
开发者ID:rskonieczka,项目名称:MagentoConnectorBundle,代码行数:7,代码来源:CategoryReader.php

示例7: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'help' => 'pim_magento_connector.export.channel.help', 'label' => 'pim_magento_connector.export.channel.label']], 'enabled' => ['type' => 'switch', 'options' => ['required' => true, 'help' => 'pim_magento_connector.export.enabled.help', 'label' => 'pim_magento_connector.export.enabled.label']], 'visibility' => ['type' => 'text', 'options' => ['required' => true, 'help' => 'pim_magento_connector.export.visibility.help', 'label' => 'pim_magento_connector.export.visibility.label']], 'currency' => ['type' => 'choice', 'options' => ['choices' => $this->currencyManager->getCurrencyChoices(), 'required' => true, 'help' => 'pim_magento_connector.export.currency.help', 'label' => 'pim_magento_connector.export.currency.label', 'attr' => ['class' => 'select2']]]], $this->categoryMappingMerger->getConfigurationField(), $this->attributeMappingMerger->getConfigurationField());
 }
开发者ID:jarocks,项目名称:MagentoConnectorBundle,代码行数:7,代码来源:AbstractProductProcessor.php

示例8: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array_merge(parent::getConfigurationFields(), ['channel' => ['type' => 'choice', 'options' => ['choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'help' => 'pim_prestashop_connector.export.channel.help', 'label' => 'pim_prestashop_connector.export.channel.label']], 'enabled' => ['type' => 'switch', 'options' => ['required' => true, 'help' => 'pim_prestashop_connector.export.enabled.help', 'label' => 'pim_prestashop_connector.export.enabled.label']], 'visibility' => ['type' => 'text', 'options' => ['required' => true, 'help' => 'pim_prestashop_connector.export.visibility.help', 'label' => 'pim_prestashop_connector.export.visibility.label']], 'variantMemberVisibility' => ['type' => 'text', 'options' => ['required' => true, 'help' => 'pim_prestashop_connector.export.variant_member_visibility.help', 'label' => 'pim_prestashop_connector.export.variant_member_visibility.label']], 'currency' => ['type' => 'choice', 'options' => ['choices' => $this->currencyManager->getCurrencyChoices(), 'required' => true, 'help' => 'pim_prestashop_connector.export.currency.help', 'label' => 'pim_prestashop_connector.export.currency.label', 'attr' => ['class' => 'select2']]], 'smallImageAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_prestashop_connector.export.smallImageAttribute.help', 'label' => 'pim_prestashop_connector.export.smallImageAttribute.label', 'attr' => ['class' => 'select2']]], 'baseImageAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_prestashop_connector.export.baseImageAttribute.help', 'label' => 'pim_prestashop_connector.export.baseImageAttribute.label', 'attr' => ['class' => 'select2']]], 'thumbnailAttribute' => ['type' => 'choice', 'options' => ['choices' => $this->attributeManager->getImageAttributeChoice(), 'help' => 'pim_prestashop_connector.export.thumbnailAttribute.help', 'label' => 'pim_prestashop_connector.export.thumbnailAttribute.label', 'attr' => ['class' => 'select2']]], 'urlKey' => ['type' => 'checkbox', 'options' => ['help' => 'pim_prestashop_connector.export.urlKey.help', 'label' => 'pim_prestashop_connector.export.urlKey.label']], 'skuFirst' => ['type' => 'checkbox', 'options' => ['help' => 'pim_prestashop_connector.export.skuFirst.help', 'label' => 'pim_prestashop_connector.export.skuFirst.label']]], $this->categoryMappingMerger->getConfigurationField(), $this->attributeMappingMerger->getConfigurationField());
 }
开发者ID:mejdoubimeriem,项目名称:prestashopconnector,代码行数:7,代码来源:AbstractProductProcessor.php

示例9: getConfigurationFields

 /**
  * {@inheritdoc}
  */
 public function getConfigurationFields()
 {
     return array('channel' => array('type' => 'choice', 'options' => array('choices' => $this->channelManager->getChannelChoices(), 'required' => true, 'select2' => true, 'label' => 'pim_base_connector.export.channel.label', 'help' => 'pim_base_connector.export.channel.help')), 'exportFrom' => array('required' => false, 'options' => array('help' => 'dnd_magento_connector.export.exportFrom.help', 'label' => 'dnd_magento_connector.export.exportFrom.label')), 'batchExportID' => array('required' => false, 'options' => array('help' => 'dnd_magento_connector.export.batchExportID.help', 'label' => 'dnd_magento_connector.export.batchExportID.label')), 'isEnabled' => array('type' => 'switch', 'required' => false, 'options' => array('help' => 'dnd_magento_connector.export.isEnabled.help', 'label' => 'dnd_magento_connector.export.isEnabled.label')), 'isComplete' => array('type' => 'switch', 'required' => false, 'options' => array('help' => 'dnd_magento_connector.export.isComplete.help', 'label' => 'dnd_magento_connector.export.isComplete.label')));
 }
开发者ID:nocturnalfrog,项目名称:DnD-MagentoConnectorBundle,代码行数:7,代码来源:ORMProductReader.php

示例10: testGetChannelChoices

 /**
  * Test related method
  */
 public function testGetChannelChoices()
 {
     $expectedArray = array('ecommerce' => 'Ecommerce', 'mobile' => 'Mobile');
     $channelChoices = $this->manager->getChannelChoices();
     $this->assertEquals($expectedArray, $channelChoices);
 }
开发者ID:javiersantos,项目名称:pim-community-dev,代码行数:9,代码来源:ChannelManagerTest.php


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