【问题标题】:Extending helper functions in Lithium在 Lithium 中扩展辅助函数
【发布时间】:2015-07-11 19:39:22
【问题描述】:

我想使用this code 来扩展表单助手类,有人可以解释我需要在哪里保存代码以及如何确保在我创建表单时包含它。

目前我已将其保存到extensions/helper/Forms.php,然后调用它

<?php use app\extensions\helper\Form; ?>

在我的控制器内部。

【问题讨论】:

    标签: php lithium


    【解决方案1】:

    您已正确放置和命名文件。但是在模板中使用了助手。

    <p>Here is a <?= $this->html->link('link', 'http://li3.me') ?> you'll all enjoy.</p>
    

    查看手册了解更多信息http://li3.me/docs/manual/views/helpers.md

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-25
      • 2011-01-23
      • 2017-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多