[TYPO3-mvc] Get related 1:n object from external class
Gianluca Strafella
gianluca.strafella at webformat.com
Mon Nov 11 08:49:29 CET 2013
Hi Henry,
is correct this: $this->roomratenum * $this->conversionratenum
You wrote that you need to multiply the objects "roomrate" and
"conversionratenum", but in the multiplication that I see there are
"roomratenum" and "conversionratenum" ... I don't know if there is a
typing error here ...
How you get the properties "roomratenum" and "conversionratenum" ? Are
they in your "room" Model ?
Regards,
Gianluca
Gianluca Strafella
Software Developer
gianluca.strafella at webformat.com
Tel. +39-0427-926.389
WEBFORMAT srl – www.webformat.com
Via Mecenate, 76 - 20138 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)
Il 08/11/2013 20:37, Henry DoShell ha scritto:
> Hi,
>
> think this is a newbie question. In my model "room" that contains the
> object "roomrate" I've a 1:n relation to an external class
> "conversionrate" with the object "conversionratenum". Now I need to
> multiply the objects "roomrate" and "conversionratenum" , but I am not
> able to get the correct value, its null:
>
> /**
> * Returns the sellingrate
> *
> * @return \float $sellingrate
> */
> public function getSellingrate() {
> return $this->roomratenum * $this->conversionratenum;
> }
>
> All repositories and injections are made, in frontend everything is all
> right.
>
> Think I have to set the external class in reflection part. Could please
> someone push me in the right direction?
>
> Thnks
> Henry
More information about the TYPO3-project-typo3v4mvc
mailing list