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

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

public update ( )
    public function update()
    {
        try {
            $ts = time();
            $this->model->setModificationDate($ts);
            $type = get_object_vars($this->model);
            foreach ($type as $key => $value) {
                if (in_array($key, $this->getValidTableColumns("redirects"))) {
                    if (is_bool($value)) {
                        $value = (int) $value;
                    }
                    $data[$key] = $value;
                }
            }
            $this->db->update("redirects", $data, $this->db->quoteInto("id = ?", $this->model->getId()));
        } catch (\Exception $e) {
            throw $e;
        }
        $this->model->clearDependentCache();
    }