當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。