本文整理匯總了PHP中Magento\Mtf\Fixture\InjectableFixture::getDownloadableLinks方法的典型用法代碼示例。如果您正苦於以下問題:PHP InjectableFixture::getDownloadableLinks方法的具體用法?PHP InjectableFixture::getDownloadableLinks怎麽用?PHP InjectableFixture::getDownloadableLinks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Mtf\Fixture\InjectableFixture
的用法示例。
在下文中一共展示了InjectableFixture::getDownloadableLinks方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fillOptions
/**
* Filling the options specified for the product.
*
* @param InjectableFixture $product
* @return void
*
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
public function fillOptions(InjectableFixture $product)
{
/** @var DownloadableProduct $product */
$downloadableLinks = isset($product->getDownloadableLinks()['downloadable']['link']) ? $product->getDownloadableLinks()['downloadable']['link'] : [];
$checkoutData = $product->getCheckoutData();
if (isset($checkoutData['options'])) {
foreach ($checkoutData['options']['links'] as $key => $linkData) {
$linkKey = str_replace('link_', '', $linkData['label']);
$linkData['label'] = $downloadableLinks[$linkKey]['title'];
$checkoutData['options']['links'][$key] = $linkData;
}
$this->getDownloadableLinksBlock()->fill($checkoutData['options']['links']);
}
parent::fillOptions($product);
}