Joomla 3 - 使用什么来代替 allocateRef?

2023-12-11

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

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 中已弃用/删除。

我应该用什么来代替?


不再需要 allocateRef() 和 allocate(),自 Joomla 1.6+ 起 至少需要 PHP 5.2(PHP5 使用引用分配)。

在view.html.php中使用

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

在模板中只需调用$this->pagination.

要了解最新的技能,请查看官方乔姆拉!文档

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Joomla 3 - 使用什么来代替 allocateRef? 的相关文章