有没有办法在 TYPO3 的扩展安装期间创建对象/ table 条目?
Is there a way to create objects/ table entries during the extension installation in TYPO3?
我想在安装扩展的过程中创建对象。例如我有以下两个简单的域模型:
class Product extends AbstractEntity
{
protected $name = '';
protected $sku = '';
...
}
class Location extends AbstractEntity
{
protected $name = '';
protected $city = '';
...
}
和第三个域模型,如:
class Mapper extends AbstractEntity
{
protected $domainModelName = '';
protected $domainModelProperty = '';
}
现在我也想添加这样的条目:
domain_model_name | domain_model_property
Product | name
Product | sku
Location | city
....
在安装扩展的过程中或者安装之后,tx_foxexample_domain_model_mapper table 会自动填充,这样可以吗?
我知道我可以使用 initializeAction,但是只有当我添加插件并访问页面等时才会生成条目,但我希望在使用插件之前条目/对象已经存在,或者添加一些对象。
我想在安装扩展的过程中创建对象。例如我有以下两个简单的域模型:
class Product extends AbstractEntity
{
protected $name = '';
protected $sku = '';
...
}
class Location extends AbstractEntity
{
protected $name = '';
protected $city = '';
...
}
和第三个域模型,如:
class Mapper extends AbstractEntity
{
protected $domainModelName = '';
protected $domainModelProperty = '';
}
现在我也想添加这样的条目:
domain_model_name | domain_model_property
Product | name
Product | sku
Location | city
....
在安装扩展的过程中或者安装之后,tx_foxexample_domain_model_mapper table 会自动填充,这样可以吗?
我知道我可以使用 initializeAction,但是只有当我添加插件并访问页面等时才会生成条目,但我希望在使用插件之前条目/对象已经存在,或者添加一些对象。