我正在研究Joomla 3.6,我是joomla的新手。我从api获取数据,我想将该数据传递给视图。我怎么能这样做。
Controler:user.php
public function profile() {
$wskey = sdafsda;
$companycode = 'sdafsd';
$client = 1;
$cardno = 'sdafsd';
$pin = 'sdaf';
$wsdl = 'http://example/service.asmx?wsdl';
$getdata = array(
'WSKey' => $wskey,
'CompanyCode' => $companycode,
'CardNo' => $this->EncryptData($cardno),
'Client' => $client,
'PIN' => $this->EncryptData($pin),
);
$soapClient = new SoapClient($wsdl);
try {
$result = $soapClient->GetProfile($getdata);
} catch (Exception $e) {
return $e;
}
}
视图在com_users->views->cprofile
中创建。
我想在default.php
个cprofile
次观看中显示这些数据,并希望了解如何使用数据调用视图。
对不起,可能不太清楚。