我有领域模型篮子和文章。如果我调用以下命令,我会收到购物篮中的文章。
$articlesInBasket = $basket->getArticles();
如何使用 TYPO3 标准属性,如 crdate 和 cruuser_id。使用这样的东西会很好:
$basket->getCrUser();
$basket->getCrDate();
这适用于 TYPO3 8.7 和 9.5
model:
/**
* @var \DateTime
*/
protected $crdate = null;
/**
* Returns the creation date
*
* @return \DateTime $crdate
*/
public function getCrdate()
{
return $this->crdate;
}
TCA -> 将其添加到列中;
'columns' => [
'crdate' => [
'config' => [
'type' => 'passthrough',
],
],
...
]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)