Pimcore\Model\Tool\Email\Blacklist\Dao::save PHP Метод

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

Save object to database
public save ( ) : void
Результат void
    public function save()
    {
        $this->model->setModificationDate(time());
        if (!$this->model->getCreationDate()) {
            $this->model->setCreationDate(time());
        }
        $version = get_object_vars($this->model);
        // save main table
        foreach ($version as $key => $value) {
            if (in_array($key, $this->getValidTableColumns("email_blacklist"))) {
                if (is_bool($value)) {
                    $value = (int) $value;
                }
                $data[$key] = $value;
            }
        }
        $this->db->insertOrUpdate("email_blacklist", $data);
        return true;
    }