首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PhpStorm -为Extbase创建项目

PhpStorm -为Extbase创建项目
EN

Stack Overflow用户
提问于 2017-06-12 16:33:35
回答 1查看 149关注 0票数 0

我正在用PhpStorm开发一个TYPO3 Extbase扩展。我收到成百上千的通知,说找不到字段x,例如Field 'request' not found in DownloadController

official documentation仅涵盖NetBeans和eclipse。它在PhpStorm中是如何工作的?

EN

回答 1

Stack Overflow用户

发布于 2017-06-12 18:53:45

  1. 添加TYPO3源

代码语言:javascript
复制
- Open your Project Tree (ALT-1)
- At the end you find "External Libraries" -> RightClick -> Configure PHP include Paths -> add your TYPO3 source path 

在那里也设置正确的php版本

  1. PHP文档注释

确保为每个函数使用正确的php注释头- PHPStorm为参数信息解析它们,并且ExtBase也使用它们。

来自TYPO3核心的示例:

代码语言:javascript
复制
/**
 * 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)
{
    ...
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44494823

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档