我正在使用現有網站w/Joomla作爲CMS。我碰到用於獲取用戶的支付信息的PHP一行代碼是:Joomla的getParams()函數從哪裏找到目錄中的參數?
$params = JComponentHelper::getParams('com_paymentportal');
com_paymentportal是一個目錄,而不是一個文件或對象。那麼它在哪裏獲取參數?
我正在使用現有網站w/Joomla作爲CMS。我碰到用於獲取用戶的支付信息的PHP一行代碼是:Joomla的getParams()函數從哪裏找到目錄中的參數?
$params = JComponentHelper::getParams('com_paymentportal');
com_paymentportal是一個目錄,而不是一個文件或對象。那麼它在哪裏獲取參數?
方法JComponentHelper::getParams('com_whatever')
只是從數據庫中抓取組件的配置參數。表#__extensions
有一個列params
,其中包含組件的配置對象。
下面是一些相關鏈接: http://www.webtechriser.com/tutorials/82-joomla-3-0/85-get-component-module-and-plugin-parameters-in-joomla-3 https://api.joomla.org/cms-3/classes/JComponentHelper.html#method_getParams
您需要登錄到您正在開發的網站的Joomla管理端。
「com」是「Components」的縮寫;登錄後,點擊頂部工具欄中的「組件」標籤。然後遍歷問題中看到的正確組件,如「支付門戶」。