gpt4 book ai didi

Joomla 3 - 使用什么代替 assignRef?

转载 作者:行者123 更新时间:2023-12-01 10:01:56 25 4
gpt4 key购买 nike

在我的项目中,我认为有这个方法:

public function elegirSeleccionados(){
$this->assignRef('pagination', $this->get('pagination'));
$this->assignRef('items', $this->get('recientes'));
$this->assignRef('list', $this->get('list'));
parent::display();
}

assignRef 在此 Joomla 3 中被弃用/删除。

我应该改用什么?

最佳答案

不再需要 assignRef() 和 assign(),因为 Joomla 1.6+至少需要 PHP 5.2(PHP5 使用引用赋值)。

在view.html.php中使用

$this->pagination = $this->get('pagination')

并在模板中调用$this->pagination

要使您的技能与时俱进,请查看官方 Joomla! Documentation

关于Joomla 3 - 使用什么代替 assignRef?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14883180/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com