public function getByKey($key)
{
$data = $this->db->fetchAll("SELECT * FROM " . static::getTableName() . " WHERE `key` = ? ORDER BY `creationDate` ", $key);
if (!empty($data)) {
foreach ($data as $d) {
$this->model->addTranslation($d["language"], $d["text"]);
}
$this->model->setKey($d['key']);
$this->model->setCreationDate($d['creationDate']);
$this->model->setModificationDate($d['modificationDate']);
} else {
throw new \Exception("Translation-Key -->'" . $key . "'<-- not found");
}
}