Pimcore\Model\Translation\AbstractTranslation\Dao::save PHP Метод

save() публичный Метод

Save object to database
public save ( ) : void
Результат void
    public function save()
    {
        if ($this->model->getKey() !== '') {
            foreach ($this->model->getTranslations() as $language => $text) {
                $data = ["key" => $this->model->getKey(), "language" => $language, "text" => $text, "modificationDate" => $this->model->getModificationDate(), "creationDate" => $this->model->getCreationDate()];
                $this->db->insertOrUpdate(static::getTableName(), $data);
            }
        }
        $this->model->clearDependentCache();
    }