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


PHP Factory::getBlockFactory方法代码示例

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


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

示例1: fillBundleOptions

 /**
  * Fill bundle options
  *
  * @param array $bundleOptions
  * @return void
  */
 public function fillBundleOptions($bundleOptions)
 {
     $index = 1;
     foreach ($bundleOptions as $option) {
         /** @var $optionBlock \Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option\Radio|
          * \Magento\Bundle\Test\Block\Catalog\Product\View\Type\Option\Select */
         $getClass = 'getMagentoBundleCatalogProductViewTypeOption' . ucfirst($option['type']);
         $optionBlock = Factory::getBlockFactory()->{$getClass}($this->_rootElement->find('.field.option.required:nth-of-type(' . $index++ . ')'));
         $optionBlock->fillOption($option);
     }
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:17,代码来源:Bundle.php

示例2: fillFormTab

 /**
  * Select cross-sells products
  *
  * @param array $products
  * @param Element|null $context
  * @return $this
  */
 public function fillFormTab(array $products, Element $context = null)
 {
     if (!isset($products['crosssell_products'])) {
         return $this;
     }
     $element = $context ?: $this->_rootElement;
     $crossSellBlock = Factory::getBlockFactory()->getMagentoCatalogAdminhtmlProductEditTabCrosssellGrid($element->find('#cross_sell_product_grid'));
     foreach ($products['crosssell_products']['value'] as $product) {
         $crossSellBlock->searchAndSelect($product);
     }
     return $this;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:19,代码来源:Crosssell.php

示例3: getTemplateBlock

 /**
  * Get backend abstract block
  *
  * @return \Magento\Backend\Test\Block\Template
  */
 protected function getTemplateBlock()
 {
     return Factory::getBlockFactory()->getMagentoBackendTemplate($this->_rootElement->find($this->templateBlock, Locator::SELECTOR_XPATH));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Form.php

示例4: getVariationsBlock

 /**
  * Get variations block
  *
  * @return \Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config
  */
 protected function getVariationsBlock()
 {
     return Factory::getBlockFactory()->getMagentoCatalogAdminhtmlProductEditTabSuperConfig($this->_rootElement->find($this->variationsWrapper));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:ProductForm.php

示例5: getPageActionsBlock

 /**
  * Retrieve actions block
  *
  * @return \Magento\Backend\Test\Block\System\Store\Actions
  */
 public function getPageActionsBlock()
 {
     return Factory::getBlockFactory()->getMagentoBackendSystemStoreActions($this->_browser->find($this->actionsBlock));
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:9,代码来源:NewStore.php

示例6: getTemplateBlock

 /**
  * Get abstract block
  *
  * @return \Magento\Backend\Test\Block\Template
  */
 public function getTemplateBlock()
 {
     return Factory::getBlockFactory()->getMagentoBackendTemplate($this->_browser->find($this->templateBlock, Locator::SELECTOR_CSS));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:CatalogCategory.php

示例7: getMatrixBlock

 /**
  * Get product variations matrix block
  *
  * @return \Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix
  */
 protected function getMatrixBlock()
 {
     return Factory::getBlockFactory()->getMagentoCatalogAdminhtmlProductEditTabSuperConfigMatrix($this->_rootElement->find($this->matrixBlock, Locator::SELECTOR_CSS));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Config.php

示例8: getMessagesBlock

 /**
  * Get messages block
  *
  * @return \Magento\Core\Test\Block\Messages
  */
 public function getMessagesBlock()
 {
     return Factory::getBlockFactory()->getMagentoCoreMessages($this->_browser->find($this->messagesBlock, Locator::SELECTOR_CSS));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:ProcessList.php

示例9: getBundleOptionBlock

 /**
  * Get bundle options block
  *
  * @param int $blockNumber
  * @return \Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option
  */
 protected function getBundleOptionBlock($blockNumber)
 {
     return Factory::getBlockFactory()->getMagentoBundleAdminhtmlCatalogProductEditTabBundleOption($this->_rootElement->find($this->bundleOptionBlock . $blockNumber));
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:10,代码来源:Bundle.php

示例10: getBundleBlock

 /**
  * Get bundle options block
  *
  * @return \Magento\Bundle\Test\Block\Catalog\Product\View\Type\Bundle
  */
 public function getBundleBlock()
 {
     return Factory::getBlockFactory()->getMagentoBundleCatalogProductViewTypeBundle($this->_rootElement->find($this->bundleBlock));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:View.php

示例11: getGroup

 /**
  * Retrieve store configuration form group
  *
  * @param string $name
  * @return Form\Group
  */
 public function getGroup($name)
 {
     $blockFactory = Factory::getBlockFactory();
     $element = $this->_rootElement->find(sprintf($this->groupBlock, $name), Locator::SELECTOR_XPATH);
     return $blockFactory->getMagentoBackendSystemConfigFormGroup($element);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:Form.php

示例12: getPriceBlock

 /**
  * Get block price
  *
  * @return \Magento\Catalog\Test\Block\Product\Price
  */
 protected function getPriceBlock()
 {
     return Factory::getBlockFactory()->getMagentoCatalogProductPrice($this->_rootElement->find('.product-info-main .price-box'));
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:9,代码来源:View.php

示例13: getMessagesBlock

 /**
  * Get global messages block
  *
  * @return \Magento\Core\Test\Block\Messages
  */
 public function getMessagesBlock()
 {
     return Factory::getBlockFactory()->getMagentoCoreMessages($this->_browser->find($this->messagesBlock));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:AdminAuthLogin.php

示例14: getProductPriceBlock

 /**
  * This method returns the price box block for the named product.
  *
  * @param string $productName String containing the name of the product to find.
  * @return Price
  */
 public function getProductPriceBlock($productName)
 {
     return Factory::getBlockFactory()->getMagentoCatalogProductPrice($this->getProductDetailsElement($productName)->find($this->priceBlockClass, Locator::SELECTOR_CLASS_NAME));
 }
开发者ID:aiesh,项目名称:magento2,代码行数:10,代码来源:ListProduct.php

示例15: getSelectionBlock

 /**
  * Get product row assigned to bundle option
  *
  * @param int $rowNumber
  * @param Element $context
  * @return \Magento\Bundle\Test\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection
  */
 protected function getSelectionBlock($rowNumber, Element $context = null)
 {
     $element = $context !== null ? $context : $this->_rootElement;
     return Factory::getBlockFactory()->getMagentoBundleAdminhtmlCatalogProductEditTabBundleOptionSelection($element->find($this->selectionBlock . '_' . $rowNumber));
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:12,代码来源:Option.php


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