我想在TYPO3文件集中添加其他字段 .
我用this Documentation尝试了它并将我的字段添加到TCA和DB . 只要我访问我的新闻字段,这样就可以正常工作 .
下一步是我尝试扩展模型以获得我的字段的getter和setter,并设置extbase以使用我的模型Class . 但是TYPO3忽略了它 .
StaticFileCollection.php
class StaticFileCollection extends \TYPO3\CMS\Core\Resource\Collection\StaticFileCollection
{
/**
* Subheader
*
* @var string
*/
protected $subheader = '';
/**
* Returns the subheader
*
* @return string $subheader
*/
public function getSubheader()
{
return $this->subheader;
}
/**
* Sets the subheader
*
* @param string $subheader
* @return void
*/
public function setSubheader($subheader)
{
$this->subheader = $subheader;
}
}
SETUP.TXT
config.tx_extbase {
objects {
TYPO3\CMS\Core\Resource\Collection\StaticFileCollection {
className = MyNamespace\MyExtension\Domain\Model\StaticFileCollection
}
}
}
我错过了什么?
1 回答
您的设置应如下所示: