Crud\Action\AddAction::_post PHP Method

_post() protected method

HTTP POST handler
protected _post ( ) : Response | null
return Cake\Network\Response | null
    protected function _post()
    {
        $subject = $this->_subject(['entity' => $this->_entity($this->_request()->data, $this->saveOptions()), 'saveMethod' => $this->saveMethod(), 'saveOptions' => $this->saveOptions()]);
        $this->_trigger('beforeSave', $subject);
        $saveCallback = [$this->_table(), $subject->saveMethod];
        if (call_user_func($saveCallback, $subject->entity, $subject->saveOptions)) {
            return $this->_success($subject);
        }
        return $this->_error($subject);
    }