0

我用它来扩展 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());

我想念什么?

4

0 回答 0