Joomla 3-用什么代替assignRef? [英] Joomla 3 - What to use instead of assignRef?

查看:101
本文介绍了Joomla 3-用什么代替assignRef?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我认为该方法是

In my project I have this method in my view:

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 is deprecated / removed in this Joomla 3.

我应该用什么代替?

推荐答案

assignRef()和assign()不再需要 ,因为Joomla 1.6+ 至少需要PHP 5.2(PHP5使用按引用分配).

assignRef() and assign() are not needed anymore, since Joomla 1.6+ requires at least PHP 5.2 (PHP5 uses assign by reference).

在view.html.php中使用

Use in view.html.php

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

,然后在模板中调用$this->pagination.

要掌握最新技能,请查看官方 Joomla!文档

To get your skills up to date check the official Joomla! Documentation

这篇关于Joomla 3-用什么代替assignRef?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆