Commit 6ad26048 authored by Stefan Busemann's avatar Stefan Busemann

[FEATURE] add crdate as column to the model

parent 416f9e06
<?php
namespace T3o\T3oDonation\Domain\Model;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Class \T3o\T3oDonation\Domain\Model\Donation
......@@ -117,6 +118,11 @@ class Donation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $date;
/**
* @var \DateTime
*/
protected $crdate;
/**
* @return bool
*/
......@@ -417,6 +423,20 @@ class Donation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* @return \DateTime
*/
public function getDate()
{
if ($this->date) {
return $this->date;
} else {
return $this->crdate;
}
}
/**
* @return \DateTime
*/
public function getCrdate()
{
return $this->date;
}
......
......@@ -207,6 +207,11 @@ return array(
'eval' => 'datetime',
)
),
'crdate' => array(
'config' => [
'type' => 'passthrough',
],
),
),
'types' => array(
'0' => array('showitem' => 'hidden, name;;;;1-1-1, company, address, address_street, address_zip, address_city, address_state, address_country, address_country_code, url;;;;1-1-1, email, --div--;Donation, amount, fee, currency, paypal_transaction_id, date, --div--;Misc, comment, feuser, account')
......
......@@ -15,3 +15,11 @@ plugin.tx_t3odonation_form {
}
plugin.tx_t3odonation_list < plugin.tx_t3odonation_form
config.tx_extbase.persistence.classes {
Donation {
T3o\T3oDonation\Controller\Donation {
columns.crdate.mapOnProperty = crdate
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment