edrush/extbaser

从现有的数据库模式创建一个TYPO3 Extbase扩展。

v0.2.0 2015-12-14 17:39 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:38:33 UTC


README

从现有的数据库模式创建一个TYPO3 Extbase扩展。

安装

克隆或通过composer安装

composer require edrush/extbaser

用法

1. 将您的数据库模式导出为TYPO3 Extbase扩展

php bin/app.php extbaser:export dbname

(连接参数默认为Symfony最佳实践

要配置您的连接类型

php bin/app.php extbaser:export -u username -p password dbname

生成的扩展文件夹包含文件 ExtensionBuilder.json,这是为 TYPO3 Extension Builder 搭建扩展的项目文件,详见下文。

2. 将扩展上传到您的TYPO3安装

将生成的文件夹移动到您的TYPO3安装的 'typo3conf/ext' 文件夹中。

3. 在您的TYPO3安装中安装新的扩展

  • 登录到您的TYPO3后端
  • 打开模块 Extension Builder(如果没有此类模块:在扩展管理器中安装它)
  • 点击 加载 并选择您的新扩展密钥
  • 根据您的需求调整扩展配置
  • 点击 保存
  • 在扩展管理器中激活您的扩展

往返

Extbaser还支持TYPO3 Extbase扩展的往返操作,这意味着如果您使用Extbaser更新扩展,所有在扩展构建器中设置的 扩展属性 将保持不变

  • 将扩展复制到Extbaser可以访问的位置
  • 重新输入您之前使用的导出命令,并添加 -r 选项:php bin/app.php extbaser:export dbname target_extension_key -r --path=...(路径变量是扩展文件夹的父文件夹,如果扩展不在您的当前目录中,请设置它)

帮助

php bin/app.php extbaser:export --help

Usage:
  extbaser:export [options] [--] <dbname>

Arguments:
  dbname                               The database you want to export

Options:
      --extension-key[=EXTENSION-KEY]  The target TYPO3 Extension key
      --path[=PATH]                    The path to export the extension to [default: "."]
  -u, --user[=USER]                    The database user [default: "root"]
  -p, --password[=PASSWORD]            The database password
      --host[=HOST]                    The database host [default: "127.0.0.1"]
      --driver[=DRIVER]                The database driver [default: "pdo_mysql"]
      --port[=PORT]                    The database port
      --filter=FILTER                  A string pattern used to match entities that should be mapped (multiple values allowed)
  -f, --force                          Override existing extension
  -r, --round-trip                     Roundtrip existing extension
  -h, --help                           Display this help message
  -q, --quiet                          Do not output any message
  -V, --version                        Display this application version
      --ansi                           Force ANSI output
      --no-ansi                        Disable ANSI output
  -n, --no-interaction                 Do not ask any interactive question
  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

链接

Extbaser与TYPO3扩展XmTools配合使用得很好,可以将TYPO3 CMS连接到API