我用它来扩展tx_news:http://docs.typo3.org/typo3cms/extensions/news/latest/Main/Tutorial/ExtendingNews/Index.html
所以我创建了一个Class/Domain/Model/News.php
和一个Ressources/Private/extend-news.txt
。我还找到了包含我内容的文件typo3temp/Cache/Code/cache_phpcode/Domain_Model_News.php
:
/***********************************************************************
this is partial from: /var/www/vhosts/xx.ch/development/typo3conf/ext/template_xx/Classes/Domain/Model/News.php
***********************************************************************/
/**
* @var int
*/
protected $txSogexpandnewsHoehe;
/**
* Get Hoehe
*
* @return int
*/
public function getTxSogexpandnewsHoehe() {
return $this->txSogexpandnewsHoehe;
}
该字段位于数据库中,添加了ext_tables.sql
CREATE TABLE tx_news_domain_model_news (
tx_sogexpandnews_favorit boolean
tx_sogexpandnews_hoehe int
);
该字段具有值" 2"在数据库中,但我没有得到任何值,vardump返回NULL
var_dump($news->getTxSogexpandnewsHoehe());
我想念什么?