Pimcore\Model\Site\Dao::update PHP Метод

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

Save changes to database, it's an good idea to use save() instead
public update ( ) : void
Результат void
    public function update()
    {
        $ts = time();
        $this->model->setModificationDate($ts);
        $site = get_object_vars($this->model);
        foreach ($site as $key => $value) {
            if (in_array($key, $this->getValidTableColumns("sites"))) {
                if (is_array($value) || is_object($value)) {
                    $value = \Pimcore\Tool\Serialize::serialize($value);
                }
                if (is_bool($value)) {
                    $value = (int) $value;
                }
                $data[$key] = $value;
            }
        }
        $this->db->update("sites", $data, $this->db->quoteInto("id = ?", $this->model->getId()));
        $this->model->clearDependentCache();
    }