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


PHP Factory::getRepositoryFactory方法代码示例

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


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

示例1: _initData

 /**
  * Initialize fixture data
  */
 protected function _initData()
 {
     $this->_data['checkout'] = array('prices' => array('price_from' => 10, 'price_to' => 15), 'selection' => array('bundle_item_0' => 'assigned_product_0'));
     parent::_initData();
     $this->_data['fields'] = array_merge_recursive($this->_data['fields'], array('sku_type' => array('value' => 'Dynamic', 'input_value' => '0', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'), 'price_type' => array('value' => 'Dynamic', 'input_value' => '0', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'), 'weight_type' => array('value' => 'Dynamic', 'input_value' => '0', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'), 'product_website_1' => array('value' => 'Yes', 'input_value' => array(1), 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'website_ids'), 'shipment_type' => array('value' => 'Separately', 'input_value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'), 'bundle_selections' => array('value' => array('bundle_options' => array('bundle_item_0' => array('title' => 'Drop-down Option', 'type' => 'Drop-down', 'required' => 'Yes', 'assigned_products' => array('assigned_product_0' => array('search_data' => array('name' => '%item1_simple1::getName%'), 'data' => array('selection_qty' => 1, 'product_id' => '%item1_simple1::getProductId%')), 'assigned_product_1' => array('search_data' => array('name' => '%item1_virtual2::getName%'), 'data' => array('selection_qty' => 1, 'product_id' => '%item1_virtual2::getProductId%')))))), 'group' => static::GROUP)));
     $this->_repository = Factory::getRepositoryFactory()->getMagentoBundleBundle($this->_dataConfig, $this->_data);
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:10,代码来源:BundleDynamic.php

示例2: _initData

 /**
  * Initialize fixture data
  *
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  */
 protected function _initData()
 {
     $this->_data['checkout'] = ['prices' => ['price_from' => 110, 'price_to' => 120], 'selection' => [0]];
     parent::_initData();
     $this->_data['fields'] = array_merge_recursive($this->_data['fields'], ['sku_type' => ['value' => 'Fixed', 'input_value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'price_type' => ['value' => 'Fixed', 'input_value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'price' => ['value' => 100, 'group' => static::GROUP_PRODUCT_DETAILS], 'tax_class_id' => ['value' => 'Taxable Goods', 'input_value' => '2', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'weight_type' => ['value' => 'Fixed', 'input_value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'weight' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS], 'product_website_1' => ['value' => 'Yes', 'input_value' => [1], 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'website_ids'], 'shipment_type' => ['value' => 'Separately', 'input_value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'], 'bundle_selections' => ['value' => ['bundle_options' => [['title' => 'Drop-down Option', 'type' => 'Drop-down', 'required' => 'Yes', 'assigned_products' => [['search_data' => ['name' => '%item1_simple1::getName%'], 'data' => ['selection_price_value' => 10, 'selection_price_type' => 'Fixed', 'selection_qty' => 1, 'product_id' => '%item1_simple1::getProductId%']], ['search_data' => ['name' => '%item1_virtual2::getName%'], 'data' => ['selection_price_value' => 20, 'selection_price_type' => 'Percent', 'selection_qty' => 1, 'product_id' => '%item1_virtual2::getProductId%']]]]]], 'group' => static::GROUP]]);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoBundleBundle($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:BundleFixed.php

示例3: _initData

 /**
  * Init Data
  */
 protected function _initData()
 {
     $this->_dataConfig = array('assignType ' => $this->assignType);
     /** @var  $type Related|Upsell */
     $type = 'Magento\\Catalog\\Test\\Block\\Adminhtml\\Product\\Edit\\Tab\\' . ucfirst(strtolower($this->assignType));
     $this->_data = array('fields' => array($this->assignType . '_products' => array('value' => array('product_1' => array('sku' => '%' . $this->assignType . '_simple::getProductSku%', 'name' => '%' . $this->assignType . '_simple::getName%'), 'product_2' => array('sku' => '%' . $this->assignType . '_configurable::getProductSku%', 'name' => '%' . $this->assignType . '_configurable::getName%')), 'group' => $type::GROUP)));
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogAssignProducts($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:11,代码来源:AssignProducts.php

示例4: _initData

 /**
  * {@inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'virtual', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = array('is_virtual' => array('value' => '', 'group' => null), 'price' => array('value' => 15, 'group' => static::GROUP_PRODUCT_DETAILS), 'tax_class_id' => array('value' => 'Taxable Goods', 'input_value' => '2', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select'), 'qty' => array('value' => 1000, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][qty]'), 'product_website_1' => array('value' => 'Yes', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'product[website_ids][]'), 'inventory_manage_stock' => array('value' => 'No', 'input_value' => '0', 'group' => static::GROUP_PRODUCT_INVENTORY, 'input' => 'select', 'input_name' => 'product[stock_data][manage_stock]'));
     $this->_data['fields'] = array_merge($this->_data['fields'], $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogVirtualProduct($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:11,代码来源:VirtualProduct.php

示例5: _initData

 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'simple', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = $this->_getPreparedData();
     $this->_data['fields'] = array_merge($this->_data['fields'], $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogSimpleProduct($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:11,代码来源:SimpleProduct.php

示例6: _initData

 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('type_id' => 'downloadable', 'constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'downloadable', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = array('is_virtual' => ['value' => '', 'group' => null], 'price' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS], 'qty' => array('value' => 1000, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][qty]'), 'quantity_and_stock_status' => array('value' => 'In Stock', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_DETAILS, 'input_name' => 'product[quantity_and_stock_status][is_in_stock]'), 'product_website_1' => array('value' => 'Yes', 'input_value' => 1, 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'product[website_ids][]'));
     $this->_data['fields'] = $data + $this->_data['fields'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoDownloadableDownloadableProduct($this->_dataConfig, $this->_data);
 }
开发者ID:zhangjiachao,项目名称:magento2,代码行数:11,代码来源:DownloadableProduct.php

示例7: _initData

 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = array('constraint' => 'Success', 'grid_filter' => array('name'), 'create_url_params' => array('type' => 'downloadable', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID), 'input_prefix' => 'product');
     $data = array('is_virtual' => ['value' => '', 'group' => null], 'price' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS]);
     $this->_data['fields'] = $data + $this->_data['fields'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoDownloadableDownloadableProduct($this->_dataConfig, $this->_data);
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:11,代码来源:DownloadableProduct.php

示例8: __construct

 /**
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, array $placeholders = array())
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders['rewritten_category_request_path'] = array($this, 'getRewrittenRequestPath');
     $this->_repository = Factory::getRepositoryFactory()->getMagentoUrlRewriteUrlRewriteCategory($this->_dataConfig, $this->_data);
     $this->category = Factory::getFixtureFactory()->getMagentoCatalogCategory();
     $this->category->persist();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:UrlRewriteCategory.php

示例9: __construct

 /**
  * @param Config $configuration
  * @param array $placeholders
  */
 public function __construct(Config $configuration, $placeholders = array())
 {
     parent::__construct($configuration, $placeholders);
     $this->_placeholders['rewritten_product_request_path'] = array($this, 'getRewrittenRequestPath');
     $this->_repository = Factory::getRepositoryFactory()->getMagentoUrlRewriteUrlRewriteProduct($this->_dataConfig, $this->_data);
     $this->product = Factory::getFixtureFactory()->getMagentoCatalogSimpleProduct();
     $this->product->switchData('simple');
     $this->product->persist();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:UrlRewriteProduct.php

示例10: _initData

 /**
  * Init Data
  */
 protected function _initData()
 {
     $this->_dataConfig = array('assignType ' => $this->assignType);
     /** @var  $type Related|Upsell */
     $type = 'Magento\\Catalog\\Test\\Block\\Adminhtml\\Product\\Edit\\Tab\\' . ucfirst(strtolower($this->assignType));
     $productsArray = array();
     foreach ($this->_products as $key => $product) {
         /** @var $product \Magento\Catalog\Test\Fixture\Product */
         $productsArray['product_' . $key] = array('sku' => $product->getProductSku(), 'name' => $product->getName());
     }
     $this->_data['fields'][$this->assignType . '_products']['value'] = $productsArray;
     $this->_data['fields'][$this->assignType . '_products']['group'] = $type::GROUP;
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogAssignProducts($this->_dataConfig, $this->_data);
 }
开发者ID:buskamuza,项目名称:magento2-skeleton,代码行数:17,代码来源:CrosssellProducts.php

示例11: _initData

 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     $this->_dataConfig = array('constraint' => 'Success', 'request_params' => array('store' => '0'), 'input_prefix' => 'general');
     $this->_data = array('fields' => array('name' => array('value' => 'Subcategory %isolation%', 'group' => static::GROUP_GENERAL_INFORMATION), 'is_active' => array('value' => 'Yes', 'input_value' => '1', 'group' => static::GROUP_GENERAL_INFORMATION, 'input' => 'select'), 'include_in_menu' => array('value' => 'Yes', 'input_value' => '1', 'group' => static::GROUP_GENERAL_INFORMATION, 'input' => 'select'), 'use_config_group_5available_sort_by' => array('value' => '', 'input_name' => 'use_config[0]', 'input_value' => 'available_sort_by', 'group' => static::GROUP_DISPLAY_SETTINGS, 'input' => 'checkbox'), 'use_config_group_5default_sort_by' => array('value' => '', 'input_name' => 'use_config[1]', 'input_value' => 'default_sort_by', 'group' => static::GROUP_DISPLAY_SETTINGS, 'input' => 'checkbox')), 'category_path' => array('value' => 'Default Category', 'input_value' => '2'));
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCatalogCategory($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Category.php

示例12: _initData

 /**
  * Init Data
  *
  * @return void
  *
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = ['type_id' => 'configurable', 'constraint' => 'Success', 'create_url_params' => ['type' => Repository::CONFIGURABLE, 'set' => static::DEFAULT_ATTRIBUTE_SET_ID]];
     $data = ['fields' => ['price' => ['value' => '10', 'group' => static::GROUP_PRODUCT_DETAILS], 'tax_class_id' => ['value' => 'Taxable Goods', 'group' => static::GROUP_PRODUCT_DETAILS, 'input' => 'select', 'input_value' => '2'], 'weight' => ['value' => '1', 'group' => static::GROUP_PRODUCT_DETAILS], 'product_website_1' => ['value' => 'Yes', 'input_value' => [1], 'group' => static::GROUP_PRODUCT_WEBSITE, 'input' => 'checkbox', 'input_name' => 'website_ids'], 'configurable_attributes_data' => ['value' => ['0' => ['label' => ['value' => '%attribute_label_1%'], '0' => ['option_label' => ['value' => '%attribute_1_option_label_1%'], 'pricing_value' => ['value' => '1'], 'is_percent' => ['value' => 'No'], 'include' => ['value' => 'Yes']], '1' => ['option_label' => ['value' => '%attribute_1_option_label_2%'], 'pricing_value' => ['value' => '2'], 'is_percent' => ['value' => 'No'], 'include' => ['value' => 'Yes']]]], 'group' => static::GROUP], 'variations-matrix' => ['value' => ['0' => ['configurable_attribute' => ['0' => ['attribute_option' => '%attribute_1_option_label_1%']], 'value' => ['display' => ['value' => 'Yes', 'input' => 'checkbox'], 'name' => ['value' => 'Variation 0-%isolation%'], 'sku' => ['value' => 'Variation 0-%isolation%'], 'qty' => ['value' => '100']]], '1' => ['configurable_attribute' => ['0' => ['attribute_option' => '%attribute_1_option_label_2%']], 'value' => ['display' => ['value' => 'Yes', 'input' => 'checkbox'], 'name' => ['value' => 'Variation 1-%isolation%'], 'sku' => ['value' => 'Variation 1-%isolation%'], 'qty' => ['value' => '200']]]], 'group' => static::GROUP]], 'checkout_data' => ['options' => ['configurable_options' => [['title' => '0', 'value' => '0']], 'qty' => 1], 'special_price' => '10']];
     $this->_data = array_merge_recursive($this->_data, $data);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoConfigurableProductConfigurableProduct($this->_dataConfig, $this->_data);
 }
开发者ID:zhangjiachao,项目名称:magento2,代码行数:15,代码来源:ConfigurableProduct.php

示例13: _initData

 /**
  * {inheritdoc}
  */
 protected function _initData()
 {
     $this->_defaultConfig = array('grid_filter' => array('email'), 'constraint' => 'Success');
     $this->_repository = Factory::getRepositoryFactory()->getMagentoCustomerCustomer($this->_dataConfig, $this->_data);
     //Default data set
     $this->switchData('customer_US_1');
 }
开发者ID:aiesh,项目名称:magento2,代码行数:10,代码来源:Customer.php

示例14: _initData

 /**
  * Initialize fixture data
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_dataConfig = ['type_id' => 'bundle', 'constraint' => 'Success', 'create_url_params' => ['type' => 'bundle', 'set' => static::DEFAULT_ATTRIBUTE_SET_ID], 'input_prefix' => 'product'];
     $this->_repository = Factory::getRepositoryFactory()->getMagentoBundleBundle($this->_dataConfig, $this->_data);
 }
开发者ID:buskamuza,项目名称:magento2-skeleton,代码行数:9,代码来源:Bundle.php

示例15: _initData

 /**
  * Init downloadable data
  */
 protected function _initData()
 {
     parent::_initData();
     $this->_data = array_replace_recursive($this->_data, ['fields' => ['downloadable_link_purchase_type' => ['value' => 'No', 'input_value' => '0']]]);
     $this->_repository = Factory::getRepositoryFactory()->getMagentoDownloadableDownloadableProduct($this->_dataConfig, $this->_data);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:LinksNotPurchasedSeparately.php


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