子类化外国服务不起作用
Subclassing foreign Service does not work
我正在尝试从第三方扩展中子classing FileCollectionService class。但它没有发生。
ext_typoscript_setup.txt:
config.tx_extbase{
persistence{
classes{
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
subclasses {
TxFileCollectionService = FalkRoeder\MyExt\Service\FileCollectionService
}
}
}
}
}
我的 FileCollectionService.php 输入 Classes/Service
<?php
namespace FalkRoeder\MyExt\Service;
/**
* FileCollectionService
*/
class FileCollectionService extends \SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
/**
* @return array
*/
public function methodToOverwrite() {
...
}
}
为了让它工作,我需要将以下代码添加到 ext_typoscript_setup.txt:
config.tx_extbase {
objects {
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService.className = FalkRoeder\MyExt\Service\FileCollectionService
}
}
试试这样的东西。
config.tx_extbase{
persistence{
classes{
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
subclasses {
TxFileCollectionService = VendorName\ExtensionKey\Classes\Utility\FileCollectionService
}
}
}
}
}
我正在尝试从第三方扩展中子classing FileCollectionService class。但它没有发生。
ext_typoscript_setup.txt:
config.tx_extbase{
persistence{
classes{
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
subclasses {
TxFileCollectionService = FalkRoeder\MyExt\Service\FileCollectionService
}
}
}
}
}
我的 FileCollectionService.php 输入 Classes/Service
<?php
namespace FalkRoeder\MyExt\Service;
/**
* FileCollectionService
*/
class FileCollectionService extends \SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
/**
* @return array
*/
public function methodToOverwrite() {
...
}
}
为了让它工作,我需要将以下代码添加到 ext_typoscript_setup.txt:
config.tx_extbase {
objects {
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService.className = FalkRoeder\MyExt\Service\FileCollectionService
}
}
试试这样的东西。
config.tx_extbase{
persistence{
classes{
SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
subclasses {
TxFileCollectionService = VendorName\ExtensionKey\Classes\Utility\FileCollectionService
}
}
}
}
}