本文整理汇总了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);
}
}
示例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;
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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);
}
示例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'));
}
示例13: getMessagesBlock
/**
* Get global messages block
*
* @return \Magento\Core\Test\Block\Messages
*/
public function getMessagesBlock()
{
return Factory::getBlockFactory()->getMagentoCoreMessages($this->_browser->find($this->messagesBlock));
}
示例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));
}
示例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));
}