如何在自定义模块(Joomla 1.7)中使用自定义组件的函数?

发布于 2024-12-14 08:02:39 字数 135 浏览 3 评论 0原文

我正在 Joomla 1.7 中编写自定义组件以及一些自定义模块,但我无法弄清楚如何在自定义模块内的组件中使用函数。我不想重复这些功能,因为在进行更改时这些功能很可能会不同步。

我可以只包含一个文件来访问这些功能吗?

谢谢!

I am in the process of writing a custom component along with some custom modules in Joomla 1.7 and I am having trouble figuring out how I can use function within my component inside my custom modules. I don't want to duplicate these functions because there's a very good chance of those getting out of sync when changes are made.

Can I just include a file to get access to those functions?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风尘浪孓 2024-12-21 08:02:39

舒尔。你总是可以在模块内做这样的事情:

require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_mycompo'.DS.'helpers'.DS.'helper.php');

然后

$settings = & MyHelper::myHelperFunction();

Shure. You can always do stuff like this inside modules:

require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_mycompo'.DS.'helpers'.DS.'helper.php');

and then

$settings = & MyHelper::myHelperFunction();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文