當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FixtureInterface::getDataConfig方法代碼示例

本文整理匯總了PHP中Magento\Mtf\Fixture\FixtureInterface::getDataConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP FixtureInterface::getDataConfig方法的具體用法?PHP FixtureInterface::getDataConfig怎麽用?PHP FixtureInterface::getDataConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Mtf\Fixture\FixtureInterface的用法示例。


在下文中一共展示了FixtureInterface::getDataConfig方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: persist

 /**
  * Create product
  *
  * @param FixtureInterface $fixture [optional]
  * @return mixed|string
  */
 public function persist(FixtureInterface $fixture = null)
 {
     Factory::getApp()->magentoBackendLoginUser();
     $createProductPage = Factory::getPageFactory()->getCatalogProductNew();
     $createProductPage->open(['type' => $fixture->getDataConfig()['create_url_params']['type'], 'set' => $fixture->getDataConfig()['create_url_params']['set']]);
     $createProductPage->getProductForm()->fill($fixture);
     $createProductPage->getFormPageActions()->save();
     $createProductPage->getMessagesBlock()->waitSuccessMessage();
 }
開發者ID:,項目名稱:,代碼行數:15,代碼來源:

示例2: persist

 /**
  * Post request for creating simple product.
  *
  * @param FixtureInterface|null $fixture [optional]
  * @return array
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  * @SuppressWarnings(PHPMD.CyclomaticComplexity)
  */
 public function persist(FixtureInterface $fixture = null)
 {
     $config = $fixture->getDataConfig();
     $prefix = isset($config['input_prefix']) ? $config['input_prefix'] : null;
     $data = $this->prepareData($fixture, $prefix);
     return $this->createProduct($data, $config);
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:16,代碼來源:Curl.php

示例3: processAssert

 /**
  * Assert that duplicated product is found by sku and has correct product type, product template,
  * product status disabled and out of stock
  *
  * @param FixtureInterface $product
  * @param CatalogProductIndex $productGrid
  * @return void
  */
 public function processAssert(FixtureInterface $product, CatalogProductIndex $productGrid)
 {
     $config = $product->getDataConfig();
     $filter = ['name' => $product->getName(), 'visibility' => $product->getVisibility(), 'status' => 'Disabled', 'sku' => $product->getSku() . '-1', 'type' => ucfirst($config['create_url_params']['type']) . ' Product', 'price_to' => number_format($product->getPrice(), 2)];
     $productGrid->open()->getProductGrid()->search($filter);
     $filter['price_to'] = '$' . $filter['price_to'];
     \PHPUnit_Framework_Assert::assertTrue($productGrid->getProductGrid()->isRowVisible($filter, false), 'Product duplicate is absent in Products grid.');
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:16,代碼來源:AssertProductDuplicatedInGrid.php

示例4: selectItem

 /**
  * Select order item.
  *
  * @param FixtureInterface $product
  * @reutrn void
  */
 public function selectItem(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $productConfig = $product->getDataConfig();
     if (isset($this->productsGrids[$productConfig['type_id']])) {
         $this->blockFactory->create($this->productsGrids[$productConfig['type_id']], ['element' => $this->_rootElement])->selectItem($product);
     } else {
         $this->searchAndSelect(['name' => $product->getName()]);
     }
 }
開發者ID:QiuLihua83,項目名稱:magento-ee,代碼行數:16,代碼來源:Grid.php

示例5: selectItem

 /**
  * Select order item.
  *
  * @param FixtureInterface $product
  * @reutrn void
  */
 public function selectItem(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $productConfig = $product->getDataConfig();
     $productType = isset($productConfig['type_id']) ? ucfirst($productConfig['type_id']) : '';
     $productGridClass = 'Enterprise\\Rma\\Test\\Block\\Adminhtml\\Rma\\NewRma\\Tab\\Items\\Order\\' . $productType . 'Grid';
     if (class_exists($productGridClass)) {
         $productGrid = $this->blockFactory->create($productGridClass, ['element' => $this->_rootElement]);
         $productGrid->selectItem($product);
     } else {
         $this->searchAndSelect(['name' => $product->getName()]);
     }
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:19,代碼來源:Grid.php

示例6: getCartItem

 /**
  * Get cart item block
  *
  * @param FixtureInterface $product
  * @return CartItem
  */
 public function getCartItem(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $cartItem = null;
     if ($this->hasRender($typeId)) {
         $cartItem = $this->callRender($typeId, 'getCartItem', ['product' => $product]);
     } else {
         $cartItemBlock = $this->_rootElement->find(sprintf($this->cartItemByProductName, $product->getName()), Locator::SELECTOR_XPATH);
         $cartItem = $this->blockFactory->create('Magento\\Weee\\Test\\Block\\Cart\\CartItem', ['element' => $cartItemBlock]);
     }
     return $cartItem;
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:19,代碼來源:Cart.php

示例7: save

 /**
  * Click on "Save" button
  *
  * @param FixtureInterface|null $product [optional]
  * @return void
  */
 public function save(FixtureInterface $product = null)
 {
     $typeId = null;
     if ($product) {
         $dataConfig = $product->getDataConfig();
         $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     }
     if ($this->hasRender($typeId)) {
         $this->callRender($typeId, 'save', ['product' => $product]);
     } else {
         parent::save();
     }
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:19,代碼來源:FormPageActions.php

示例8: fillOptions

 /**
  * Fill in the option specified for the product
  *
  * @param FixtureInterface $product
  * @return void
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fillOptions(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $checkoutData = null;
     /** @var CatalogProductSimple $product */
     if ($this->hasRender($typeId)) {
         $this->callRender($typeId, 'fillOptions', ['product' => $product]);
     }
     /** @var CatalogProductSimple $product */
     $checkoutData = $product->getCheckoutData();
     $checkoutCustomOptions = isset($checkoutData['options']['custom_options']) ? $checkoutData['options']['custom_options'] : [];
     $customOptions = $product->hasData('custom_options') ? $product->getDataFieldConfig('custom_options')['source']->getCustomOptions() : [];
     $checkoutCustomOptions = $this->prepareCheckoutData($customOptions, $checkoutCustomOptions);
     $this->getCustomOptionsBlock()->fillCustomOptions($checkoutCustomOptions);
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:24,代碼來源:AbstractConfigureBlock.php

示例9: fill

 /**
  * Fill the product form.
  *
  * @param FixtureInterface $product
  * @param SimpleElement|null $element
  * @param FixtureInterface|null $category
  * @return $this
  * @throws \Exception
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null)
 {
     $this->waitPageToLoad();
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     if ($this->hasRender($typeId)) {
         $renderArguments = ['product' => $product, 'element' => $element, 'category' => $category];
         $this->callRender($typeId, 'fill', $renderArguments);
     } else {
         $sections = $this->getFixtureFieldsByContainers($product);
         if ($category) {
             $sections['product-details']['category_ids']['value'] = $category->getName();
         }
         $this->fillContainers($sections, $element);
     }
     return $this;
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:28,代碼來源:ProductForm.php

示例10: getOptions

 /**
  * Return product options.
  *
  * @param FixtureInterface $product
  * @return array
  */
 public function getOptions(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     return $this->hasRender($typeId) ? $this->callRender($typeId, 'getOptions', ['product' => $product]) : $this->getCustomOptionsBlock()->getOptions($product);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:13,代碼來源:View.php

示例11: getProductType

 /**
  * Get product type
  *
  * @return string
  */
 protected function getProductType()
 {
     $config = $this->product->getDataConfig();
     return ucfirst($config['type_id']) . ' Product';
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:10,代碼來源:AssertProductInGrid.php

示例12: getProductType

 /**
  * Get product type.
  *
  * @param FixtureInterface $product
  * @return string|null
  */
 protected function getProductType(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     return isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:11,代碼來源:ProductForm.php

示例13: createAndSaveProduct

 /**
  * Create and save product
  *
  * @param FixtureInterface $product
  * @return void
  */
 protected function createAndSaveProduct(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct($typeId);
     $this->catalogProductNew->getProductForm()->fill($product);
     $this->catalogProductNew->getFormPageActions()->save($product);
 }
開發者ID:,項目名稱:,代碼行數:15,代碼來源:

示例14: fill

 /**
  * Fill the product form.
  *
  * @param FixtureInterface $product
  * @param SimpleElement|null $element [optional]
  * @param FixtureInterface|null $category [optional]
  * @return FormTabs
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     if ($this->hasRender($typeId)) {
         $renderArguments = ['product' => $product, 'element' => $element, 'category' => $category];
         $this->callRender($typeId, 'fill', $renderArguments);
     } else {
         $tabs = $this->getFieldsByTabs($product);
         if ($category) {
             $tabs['product-details']['category_ids']['value'] = $category->getName();
         }
         $this->showAdvancedSettings();
         $this->fillTabs($tabs, $element);
         if ($product->hasData('custom_attribute')) {
             $this->createCustomAttribute($product);
         }
     }
     return $this;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:30,代碼來源:ProductForm.php

示例15: getCartItemClass

 /**
  * Get module name from fixture.
  *
  * @param FixtureInterface $product
  * @return string
  */
 protected function getCartItemClass(FixtureInterface $product)
 {
     $typeId = $product->getDataConfig()['type_id'];
     return ObjectManager::getInstance()->create($this->itemRender[$typeId], ['product' => $product]);
 }
開發者ID:chucky515,項目名稱:Magento-CE-Mirror,代碼行數:11,代碼來源:Items.php


注:本文中的Magento\Mtf\Fixture\FixtureInterface::getDataConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。