Commit dc4b4219 authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen

Merge branch 'remove-obsolete-attributes-and-set-default-datetime-for-expire' into 'develop'

Remove obsolete attributes and set default DateTime for expire

See merge request !244
parents 1879d0bc 75a5023e
Pipeline #2429 passed with stages
in 2 minutes and 47 seconds
......@@ -80,9 +80,9 @@ class Author extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Frontend user
*
* @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
* @var string
*/
protected $frontendUser;
protected $frontendUser = '';
/**
* Author type
......@@ -256,9 +256,9 @@ class Author extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Getter for frontendUser
*
* @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
* @return string
*/
public function getFrontendUser(): FrontendUser
public function getFrontendUser(): string
{
return $this->frontendUser;
}
......@@ -266,9 +266,9 @@ class Author extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Setter for frontendUser
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser
* @param string $frontendUser
*/
public function setFrontendUser(FrontendUser $frontendUser = null)
public function setFrontendUser(string $frontendUser = '')
{
$this->frontendUser = $frontendUser;
}
......
......@@ -47,18 +47,6 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $forgeLink = '';
/**
* Last update
*
* @var \DateTime
*/
protected $lastUpdate;
/**
* @var \DateTime
*/
protected $lastMaintained;
/**
* Tags
*
......@@ -208,26 +196,6 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return $this->forgeLink;
}
/**
* Sets lastUpdate
*
* @param \DateTime $lastUpdate
*/
public function setLastUpdate(\DateTime $lastUpdate)
{
$this->lastUpdate = $lastUpdate;
}
/**
* Gets lastUpdate
*
* @return \DateTime
*/
public function getLastUpdate(): \DateTime
{
return $this->lastUpdate;
}
/**
* Setter for crdate
*
......@@ -250,30 +218,6 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return $this->crdate;
}
/**
* Setter for lastMaintained
*
* @param \DateTime $lastMaintained lastMaintained
* @return void
*/
public function setLastMaintained(\DateTime $lastMaintained)
{
$this->lastMaintained = $lastMaintained;
}
/**
* Getter for lastMaintained
*
* @return \DateTime lastMaintained
*/
public function getLastMaintained(): \DateTime
{
return $this->lastMaintained;
}
/**
* Getter for tags
*
......@@ -649,6 +593,10 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
public function getExpire(): \DateTime
{
if ($this->expire === null) {
$this->expire = new \DateTime();
$this->expire->setTimestamp(0);
}
return $this->expire;
}
......
......@@ -59,7 +59,6 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* Author
*
* @var \T3o\TerFe2\Domain\Model\Author
* @lazy
*/
protected $author;
......@@ -287,13 +286,6 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $zipFileSize = 0;
/**
* Crdate from database
*
* @var \DateTime
*/
protected $creationDate;
/**
* Constructor. Initializes all ObjectStorage instances.
*/
......@@ -563,23 +555,6 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return $this->state;
}
/**
* @param \DateTime $creationDate
* @return void
*/
public function setCreationDate(\DateTime $creationDate)
{
$this->creationDate = $creationDate;
}
/**
* @return \DateTime
*/
public function getCreationDate(): \DateTime
{
return $this->creationDate;
}
/**
* Setter for emCategory
*
......
......@@ -73,9 +73,6 @@ plugin.tx_terfe2 {
mapping {
tableName = cache_extensions
recordType = \T3o\TerFe2\Domain\Model\ExtensionManagerCacheEntry
columns {
crdate.mapOnProperty = creationDate
}
}
}
\TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
......@@ -94,16 +91,6 @@ plugin.tx_terfe2 {
}
}
config.tx_extbase.persistence.classes {
\T3o\TerFe2\Domain\Model\Version {
mapping {
columns {
crdate.mapOnProperty = creationDate
}
}
}
}
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ter_fe2/Configuration/TypoScript/Default/Plugins/Solr.ts">
# ======================================================================
......
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