0
我正在開發一個帶PhpStorm的TYPO3 Extbase擴展。我收到數百個通知,說Field x找不到Field 'request' not found in DownloadController
。PhpStorm - 爲Extbase創建項目
official documentation僅涵蓋NetBeans和eclipse。 它如何在PhpStorm中工作?
我正在開發一個帶PhpStorm的TYPO3 Extbase擴展。我收到數百個通知,說Field x找不到Field 'request' not found in DownloadController
。PhpStorm - 爲Extbase創建項目
official documentation僅涵蓋NetBeans和eclipse。 它如何在PhpStorm中工作?
添加TYPO3來源
設置正確的PHP版本有作爲
一定要使用正確的PHP註釋標題爲每個函數 - PHPStorm解決他們的參數信息,並ExtBase使用它們。從TYPO3核心
例子:
/**
* Returns the absolute filename of a relative reference, resolves the "EXT:" prefix
* (way of referring to files inside extensions) and checks that the file is inside
* the PATH_site of the TYPO3 installation and implies a check with
* \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr().
*
* @param string $filename The input filename/filepath to evaluate
* @param bool $onlyRelative If $onlyRelative is set (which it is by default), then only return values relative to the current PATH_site is accepted.
* @param bool $relToTYPO3_mainDir If $relToTYPO3_mainDir is set, then relative paths are relative to PATH_typo3 constant - otherwise (default) they are relative to PATH_site
* @return string Returns the absolute filename of $filename if valid, otherwise blank string.
*/
public static function getFileAbsFileName($filename, $onlyRelative = true, $relToTYPO3_mainDir = false)
{
...
}
謝謝,還剩下一個問題。 typo3安裝,因此extbase在遠程ftp服務器上,我還可以包含它嗎?我看不到選擇「選擇從ftp服務器」或類似的選項。 – Black
您必須下載代碼才能將其作爲庫包含在內。通常你只需要'extbase'和'fluid'擴展的代碼 –
我通常有一個用於開發的本地副本,以及一個包含所有typo3源代碼(不同版本)的額外文件夾。從這裏下載TYPO3源代碼:https://get.typo3.org/,然後解壓並鏈接到你的項目。 附加PHPStorm提示:工具 - >部署 - >配置:在這裏添加你的FTP服務器,然後你可以上傳,下載,合併,比較和你需要的一切。但要小心 - 每次更改都會有「自動上傳」,這很誘人,但可能很危險! –