在产品过滤器 phtml 文件中 Magento 调用函数 getHtml()。
Magento 中的 getHtml() 是什么以及 getHtml() 和 getChildHtml() 之间的区别。
最佳答案
以编程方式 getHtml()
是调用 protected 渲染方法的公共(public)方法Mage_Core_Block_Template::_toHtml()
, 而 getChildHtml()
尝试从调用 block 的 _children
中查找 block 实例数组并使用更常见的 Mage_Core_Block_Abstract::toHtml()
返回其渲染的值方法。
在架构上,除了为这些过滤器 block 实例减少微小的处理开销、内联翻译和缓存写入之外,我还不是 100% 清楚任何意图。
关于magento - Magento 中的 getHtml() 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12976231/