我正在用PhpStorm开发一个TYPO3 Extbase扩展。我收到成百上千的通知,说找不到字段x,例如Field 'request' not found in DownloadController。
official documentation仅涵盖NetBeans和eclipse。它在PhpStorm中是如何工作的?
发布于 2017-06-12 18:53:45
- Open your Project Tree (ALT-1)
- At the end you find "External Libraries" -> RightClick -> Configure PHP include Paths -> add your TYPO3 source path
在那里也设置正确的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)
{
...
}https://stackoverflow.com/questions/44494823
复制相似问题