Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 子类化对外服务不起作用_Typo3_Extbase_Subclassing_Typo3 7.6.x - Fatal编程技术网

Typo3 子类化对外服务不起作用

Typo3 子类化对外服务不起作用,typo3,extbase,subclassing,typo3-7.6.x,Typo3,Extbase,Subclassing,Typo3 7.6.x,我正在尝试将FileCollectionService类从第三方扩展子类化。但事实并非如此 ext\u typoscript\u setup.txt: config.tx_extbase{ persistence{ classes{ SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService { subclasses { TxFileCollect

我正在尝试将FileCollectionService类从第三方扩展子类化。但事实并非如此

ext\u typoscript\u setup.txt:

config.tx_extbase{
persistence{
    classes{
        SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
            subclasses {
                TxFileCollectionService = FalkRoeder\MyExt\Service\FileCollectionService
            }
        }

    }
}
config.tx_extbase {
    objects {
        SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService.className = FalkRoeder\MyExt\Service\FileCollectionService
    }
}
}

my FileCollectionService.php放入类/服务中

<?php
namespace FalkRoeder\MyExt\Service;

/**
 * FileCollectionService
 */
class FileCollectionService extends \SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {

    /**
     * @return array
     */
    public function methodToOverwrite() {
    ...
    }
}

为了让它工作,我需要将以下代码添加到ext\u typoscript\u setup.txt中:

config.tx_extbase{
persistence{
    classes{
        SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
            subclasses {
                TxFileCollectionService = FalkRoeder\MyExt\Service\FileCollectionService
            }
        }

    }
}
config.tx_extbase {
    objects {
        SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService.className = FalkRoeder\MyExt\Service\FileCollectionService
    }
}

为了让它工作,我需要将以下代码添加到ext_typoscript_setup.txt中:

config.tx_extbase{
persistence{
    classes{
        SKYFILLERS\SfFilecollectionGallery\Service\FileCollectionService {
            subclasses {
                TxFileCollectionService = FalkRoeder\MyExt\Service\FileCollectionService
            }
        }

    }
}
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

                }
            }

        }
    }
}

试着做这样的事情

config.tx_extbase{
    persistence{
        classes{
            SKYFILLERS\\SfFilecollectionGallery\\Service\\FileCollectionService {
                subclasses {
                    TxFileCollectionService = VendorName\ExtensionKey\Classes\Utility\FileCollectionService

                }
            }

        }
    }
}