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