[TYPO3-mvc] How to use an own DateTime class?
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Thu Feb 4 23:29:36 CET 2010
Then it luckily works in the context of your extension structure,
actually what I've seend, Extbase initializes the default DateTime
class in different placed throughout its codebase.
Just have a look at the DataMap.php file or even in Fluid in the
DateViewHelper. And I think there are more places than this.
While declarating the property specificly to a custom object, will
work - of course - on some other occasions it won't use the custom one.
At least I think so. =o)
Thomas
Am 04.02.2010 11:24, schrieb Stephan Reuther - development.IT:
> Hi Thomas,
>
> i just created a new subfolder of folder "Classes" called "Utility".
> the existing folders didn't seem to be the right place for this.
> therein my file DateTime.php with class Tx_MyExt_Utility_DateTime
> which extends DateTime.
>
> as i already described my tca has got an eval: datetime
>
> not necessary to mention that all object's properties which shall
> use this own DateTime class have to be set to the right class name.
> e.g. :
>
> /**
> *
> * @var Tx_MyExt_Utility_DateTime
> * @validate NotEmpty
> */
> protected $deliverydate;
>
>
> Good ol' Extbase will do the rest - hopefully ... :)
>
>
> greets,
> stephan
>
>
More information about the TYPO3-project-typo3v4mvc
mailing list