JToolbarリストの内容をExcelにエクスポートするカスタムボタンをリストビューに追加しようとしています。リストコントローラーに新しいタスクを作成して、rawビュークラスをview.raw.phpというファイルにレンダリングしました。ただし、生データのみをロードするコンテンツを取得できません。
関連するコントローラーコードをcom_bannerstracks.raw.phpコントローラーからコピーしました
コントローラー方式:
public function exportToExcel()
{
    // Get the document object.
    $document   = JFactory::getDocument();
    $vName      = 'Mylist';
    $vFormat    = 'raw';
    // Get and render the view.
    if ($view = $this->getView($vName, $vFormat))
    {
        // Get the model for the view.
        $model = $this->getModel($vName);
        // Push the model into the view (as default).
        $view->setModel($model, true);
        // Push document object into the view.
        $view->document = $document;
        $view->display();
    }
}
そして、私のview.raw.phpファイルの簡単なテスト表示メソッド:
public function display($tpl = null)
{
   echo "Test";
}
これは「テスト」を表示しますが、テンプレートもロードします。
私は使ってみました$document->setType('Raw')が、これは私に与えています
レンダラークラスをロードできません
エラー。
これの理由はそれが探しているということです
libraries / joomla / document / raw / renderer / modules.php
存在しません。
たぶん私はこれを間違った方法で行っていますが、これをどのように正しく行う必要がありますか?