Crud\Action\EditAction::_put PHP Method

_put() protected method

HTTP PUT handler
protected _put ( string | null $id = null ) : Response | null
$id string | null Record id
return Cake\Network\Response | null
    protected function _put($id = null)
    {
        $subject = $this->_subject();
        $subject->set(['id' => $id]);
        $entity = $this->_table()->patchEntity($this->_findRecord($id, $subject), $this->_request()->data, $this->saveOptions());
        $this->_trigger('beforeSave', $subject);
        if (call_user_func([$this->_table(), $this->saveMethod()], $entity, $this->saveOptions())) {
            return $this->_success($subject);
        }
        return $this->_error($subject);
    }