[TYPO3-mvc] extending tx_news with own object
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Wed Jun 5 08:42:08 CEST 2013
Hello again
I re-wrote my News-Model, without using namespaces hoping this will work.
But sadly it doesn't. Here it comes:
class Tx_Psoabilling_Domain_Model_News extends
Tx_News_Domain_Model_NewsDefault{
/**
* @var
Tx_Extbase_Persistence_ObjectStorage<Tx_Psoabilling_Domain_Model_Band>
* @lazy
*/
protected $psoabilling;
/**
* The constructor.
* @return void
*/
public function __construct() {
$this->psoabilling = new
Tx_Extbase_Persistence_ObjectStorage();
}
/**
* @param Tx_Extbase_Persistence_ObjectStorage $psoabilling
* @return void
*/
public function setPsoabilling(Tx_Extbase_Persistence_ObjectStorage
$psoabilling){
$this->psoabilling = $psoabilling;
}
/**
* @return Tx_Extbase_Persistence_ObjectStorage
*/
public function getPsoabilling(){
return $this->psoabilling;
}
}
After reading
http://docs.typo3.org/typo3cms/extensions/news/Main/Tutorial/ExtendingNews/I
ndex.html and
http://keinerweiss.de/525-die-extbase-extension-news-um-ein-feld-erweitern.h
tml I thought I know enough to hook the news-model.
Can anyone give me hints to work forward with my news-extending hook?
Best regards
Johannes
-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Johannes C. Schulz - EnzephaloN IT-Solutions
Gesendet: Mittwoch, 5. Juni 2013 07:53
An: 'TYPO3 v4 MVC project'
Betreff: Re: [TYPO3-mvc] extending tx_news with own object
Hello Eike
|This should be class News extends \Tx_News_Domain_Model_NewsDefault{
|Otherwise the Mapper would look at
|Enzephalon\Psoabilling\Domain\Model\Tx_News_Domain_Model_NewsDefault
I think that's the same as in my model.
|Shouldn't it be Tx_Psoabilling_Domain_Model_News =
Tx_Psoabilling_Domain_Model_News
|And recordType = Tx_Psoabilling_Domain_Model_News, if you want to use
recordType.
|Now you have a type of news called Tx_Psoabilling_Domain_Model_News
It's like my TS, just with "other words". But I tried your way. No change.
|Is psoabilling there when you use <f:debug>{newsItem}</f:debug>?
No, there is no psoabilling inside of newsItem.
|The problem could also be that the repository does not look for the right
type Tx_Psoabilling_Domain_Model_News.
Do you have any idea, how to fix this?
Thanks a lot
Johannes
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list