I have the domain models Basket and Article. If I call the following I receive the articles in the basket.
$articlesInBasket = $basket->getArticles();
How can I use the TYPO3 standard attributes like crdate and cruser_id. It would be nice to use something like this:
$basket->getCrUser();
$basket->getCrDate();
This works in TYPO3 8.7 and 9.5
model:
/**
* @var \DateTime
*/
protected $crdate = null;
/**
* Returns the creation date
*
* @return \DateTime $crdate
*/
public function getCrdate()
{
return $this->crdate;
}
TCA -> add this in the colums;
'columns' => [
'crdate' => [
'config' => [
'type' => 'passthrough',
],
],
...
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With