本文整理汇总了PHP中Magento\Catalog\Helper\Data::isUrlDirectivesParsingAllowed方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::isUrlDirectivesParsingAllowed方法的具体用法?PHP Data::isUrlDirectivesParsingAllowed怎么用?PHP Data::isUrlDirectivesParsingAllowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Catalog\Helper\Data
的用法示例。
在下文中一共展示了Data::isUrlDirectivesParsingAllowed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: categoryAttribute
/**
* Prepare category attribute html output
*
* @param ModelCategory $category
* @param string $attributeHtml
* @param string $attributeName
* @return string
*/
public function categoryAttribute($category, $attributeHtml, $attributeName)
{
$attribute = $this->_eavConfig->getAttribute(ModelCategory::ENTITY, $attributeName);
if ($attribute && $attribute->getFrontendInput() != 'image' && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) {
$attributeHtml = $this->_escaper->escapeHtml($attributeHtml);
}
if ($attribute->getIsHtmlAllowedOnFront() && $attribute->getIsWysiwygEnabled()) {
if ($this->_catalogData->isUrlDirectivesParsingAllowed()) {
$attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml);
}
}
$attributeHtml = $this->process('categoryAttribute', $attributeHtml, ['category' => $category, 'attribute' => $attributeName]);
return $attributeHtml;
}
示例2: testIsUrlDirectivesParsingAllowed
/**
* isUrlDirectivesParsingAllowed()
* setStoreId()
* @magentoConfigFixture current_store catalog/frontend/parse_url_directives 0
*/
public function testIsUrlDirectivesParsingAllowed()
{
$this->assertFalse($this->helper->isUrlDirectivesParsingAllowed());
$this->helper->setStoreId(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore()->getId());
$this->assertFalse($this->helper->isUrlDirectivesParsingAllowed());
}