[TYPO3-ttnews] tx_news - Extend news fields with custom extension

bernd wilke t3ng at bernd-wilke.net
Wed Jul 10 15:58:35 CEST 2013


Am 13.06.13 05:27, schrieb Georg Ringer:
> Hi,
>
> yes sorry I don't cover that currently in the manual as this is usually
> known. This is not related to extbase or news at all.
>
> use extension "kickstarter" to create this code.
>
> I will try to come up with a new section in the manual the next days
>

I tried to extend tx_news, but used the extension_builder as I use TYPO3 
6.1.
But the extension_builder uses namespaces since 6.0 and so some 
configuration is wrong (or I did feed it wrong into the 
extension_builder???)

my configuration in the extension_builder:

Model object name [News]
:
Map to existing table: [tx_news_domain_model_news]
Extend existing model Class: [Tx_News_Domain_Model_News]

with this a file
my_ext/Classes/Domain/Model/News.php is generated with these lines:

<?php
namespace vendor\MyExt\Domain\Model;
[...]
class News extends Tx_News_Domain_Model_News {
[...]

calling the detail-view ends in an error:
Fatal error: Class 'vendor\MyExt\Domain\Model\Tx_News_Domain_Model_News' 
not found in /var/www/typo3conf/ext/my_ext/Classes/Domain/Model/News.php 
on line 35

I think it is about the namespaces but which namespace should be used 
for the news-extension?
I also tried
class News extends \TYPO3\News\Domain\Model\News {
but it helped nothing, just a changed path, where the class is missing.

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-project-tt-news mailing list