public function save()
{
$isUpdate = false;
if ($this->getId()) {
unset(self::$cache[$this->getId()]);
$isUpdate = true;
\Pimcore::getEventManager()->trigger("object.keyValue.keyConfig.preUpdate", $this);
} else {
\Pimcore::getEventManager()->trigger("object.keyValue.keyConfig.preAdd", $this);
}
$model = $this->getDao()->save();
if ($isUpdate) {
\Pimcore::getEventManager()->trigger("object.keyValue.keyConfig.postUpdate", $this);
} else {
\Pimcore::getEventManager()->trigger("object.keyValue.keyConfig.postAdd", $this);
}
return $model;
}