简体   繁体   English

如何迁移 config.persistence.classes 子类

[英]Howto migrate config.persistence.classes subclasses

As descibed in Breaking: #87623 , the config.persistence.classes typoscript configuration is replaced with the the EXT:extension/Configuration/Extbase/Persistence/Classes.php file.Breaking: #87623中所述, config.persistence.classes排版配置替换为EXT:extension/Configuration/Extbase/Persistence/Classes.php文件。

This is my old typoscript configuration:这是我旧的排版配置:

plugin.tx_news {
  persistence {
    classes {

      GeorgRinger\News\Domain\Model\News {
        subclasses {
          0 = Vendor\Extension\Domain\Model\News
        }
      }

      Vendor\Extension\Domain\Model\News {
        mapping {
          recordType = 0
          tableName = tx_news_domain_model_news
        }
      }
      
    }
  }
}

This is my new /Configuration/Extbase/Persistence/Classes.php file so far:到目前为止,这是我的新/Configuration/Extbase/Persistence/Classes.php文件:

return [

    \Vendor\News\Domain\Model\News::class => [
        'tableName' => 'tx_news_domain_model_news',
        'recordType' => 0,
    ],

];

How do I configure the missing part with the subclasses?如何使用子类配置缺失的部分?

It can be done the same way, see: https://github.com/georgringer/news/blob/8857b7cf0e174047fd06d8f22dd28eef5c43503a/Configuration/Extbase/Persistence/Classes.php可以用同样的方式完成,参见: https : //github.com/georgringer/news/blob/8857b7cf0e174047fd06d8f22dd28eef5c43503a/Configuration/Extbase/Persistence/Classes.php

return [
    \GeorgRinger\News\Domain\Model\News::class => [
        'subclasses' => [
            \Vendor\Extension\Domain\Model\News::class
        ]
    ]
]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM