Skip to content
Snippets Groups Projects
Commit a17f4382 authored by Toni Blonske's avatar Toni Blonske
Browse files

fix create meta object - add lastupdate

parent 2f049ed6
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ abstract class Base implements Options
protected $entityClass = null;
protected $importData = [];
protected $hash = null;
protected $lastUpdate = null;
protected $locale = 'de';
protected $metaObject = null;
protected $entitysToDelete = [];
......@@ -28,6 +29,7 @@ abstract class Base implements Options
$this->setPDOAccess($mySqlAccess);
$this->setImportData($importData['data']);
$this->setImportHash($importData['hash']);
$this->setLastUpdate($importData['created']);
$this->setLocale($locale);
$this->setOptions($options);
......@@ -37,6 +39,8 @@ abstract class Base implements Options
}
}
public function getPDOAccess() : PDOAccess
{
return $this->pdoAccess;
......@@ -112,6 +116,7 @@ abstract class Base implements Options
'object_id' => 0,
'locale' => $this->getLocale(),
'hash' => $this->getImportHash(),
'lastupdate' => $this->getLastUpdate(),
'type' => call_user_func($this->entityClass . '::getTableName')
]
);
......@@ -172,6 +177,17 @@ abstract class Base implements Options
return $this->hash;
}
public function setLastUpdate(string $lastUpdate) : self
{
$this->lastUpdate = $lastUpdate;
return $this;
}
public function getLastUpdate() : string
{
return $this->lastUpdate;
}
public function createEntity(array $data = array(), bool $setup = true)
{
if (null === $this->entityClass) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.