こんにちは皆さん、私は joomla 2.5 でバックエンド用のコンポーネントを作成しましたが、SQL クエリの実行に問題があります。変数が空であるため、何も表示されません。
私は他のファイルとドキュメントを持っていますが、ここで私の質問にとって重要です。
最初に私のcontroller.phpで、私はこれをadminファイルの中に持っています
class BusquedaController extends JController
{
    protected $default_view= 'restaurantes';
    public function display(){
     parent::display();
    }
}
私のモデルファイルには、restaurante.phpがあります
class BusquedaModelRestaurante extends JModelList{
    function getListaRestaurantes(){
        $db= JFactory::getDBO();
        $sql= "SELECT * FROM #__restaurantes";
        $db->setQuery($sql);
        return $db->loadObjectList();   
    }
}
私のコントローラーファイルに私はこれを持っています
class BusquedaControllerRestaurantes extends JControllerAdmin
{
    public function getModel($name = 'Restaurante', $prefix = 'BusquedaModel', $config = array('ignore_request' => true))
    {
        $model = parent::getModel($name, $prefix, $config);
        return $model;
    }
    function listado(){
        $firephp->log('hola');
        $view=& $this->getView('restaurantes', 'html');
        $model= $this->getModel("restaurante");
        $listaMensajes= $model->getListaRestaurantes();
        $view->assignRef('resList', $listaMensajes);
        $view->display();
        }
}
最後に、ビュー ファイルに、テーブルを表示する default.php を含む tmpl ファイルがあります。
foreach ($this->resList as $item):
        $checked=JHTML::_('grid.id', $n, $item->id); ?>
            <tr>
                <td><?php echo $checked; ?></td>
                <td><?php echo $item->id; ?></td>
                <td><?php echo $item->nombre; ?></td>
                <td><?php echo $item->direccion; ?></td>
                <td><?php echo $item->telefono; ?></td>
                <td><?php echo $item->web; ?></td>
                <td><?php echo $item->tipo; ?></td>
                <td><?php echo $item->zona; ?></td>
                <td><?php echo $item->metro; ?></td>
            </tr>
            <?php 
しかし、要素の reslist は空です。自分のコンポーネントがうまくできているかどうかわかりません!!、誰かが joomla 2.5 でコンポーネントを実行するためのチュートリアルまたは何かを知っています
ありがとう!