【发布时间】:2023-12-21 11:35:02
【问题描述】:
我在我的 cakephp 3.x 应用程序中使用 2.x 的图像助手,但我遇到了一个问题,在我的 cakephp 2.x 中,函数返回值如下代码
return $this->output(sprintf($this->Html->_tags['image'], $this->webroot($relfile), $this->Html->_parseAttributes($htmlAttributes, null, '', ' ')), $return);
但是在 cakephp 3.x 中输出和 _parseAttributes 函数被删除了所以我不知道如何在 cakephp 3.x 中使用这两个函数
_parseAttributes 函数包含与图像相关的数据,如 'class'、'alt' 等
我在网上搜索了很多蛋糕 3.x 中的输出功能,但没有找到任何成功的解决方案,请尝试帮助我
谢谢
【问题讨论】:
-
你能提供你期望的html代码吗?
-
预期代码为
标签: cakephp migration cakephp-3.0 helper view-helpers