これは私の初めてJoomlaのコンポーネントを作成することです。私が持っている現在の問題は、私の見解に異なるデータを出していることです。Joomlaを使用してSQLサーバーから特定の情報を抽出する
私のコンポーネントが設定モデル - ビュー - コントローラを使用して構築され、これはそれを披露PHPファイルまでのデータをもたらしビューで現在のコードです:
class TimeplanViewTimeplaner extends JViewLegacy
{
protected $items1;
protected $items2;
protected $items3;
protected $items4;
protected $items5;
protected $items6;
protected $items7;
protected $pagination;
protected $state;
protected $params;
public function display($tpl = null)
{
$app = JFactory::getApplication();
$this->state = $this->get('State');
$this->items1 = $this->get('Items');
$this->items2 = $this->get('Items');
$this->items3 = $this->get('Items');
$this->items4 = $this->get('Items');
$this->items5 = $this->get('Items');
$this->items6 = $this->get('Items');
$this->items7 = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $app->getParams('com_timeplan');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors));
}
$this->_prepareDocument();
parent::display($tpl);
}
}
これは完全なものではありませんコードですが、それは私の問題を強調すると思う部分です。私は$ 1から7のヒットを得るのが欲しいですが、現在はデータを表示するために$ this-> get( 'Items')に依存しなければなりません。私の質問は、$ this-> get( 'Items')にデータを与えるコードをどこで見つけることができるのですか?
これは基本的な質問かもしれませんが、もっとコードを表示する必要があるかもしれませんが、コードのこの部分を理解するには正しい方向にポインタが必要です。