/** * @param \Base $f3 * @param array $params */ public function post(\Base $f3, $params) { $this->response->data['SUBPART'] = 'webot_edit.html'; $msg = \Flash::instance(); if (isset($params['id'])) { // update existing $this->resource->load(array('_id = ?', $params['id'])); } parent::post($f3, $params); }
/** * Executes request on link. * * @param string $url * @param string $method * @param array $postfields * @return null|string */ private function request($url, $method = 'GET', $postfields = []) { switch (strtolower($method)) { case "get": return $this->ch->get($url); break; case "post": return $this->ch->post($url, $postfields); break; } return null; }
public function post(\Base $f3, $params) { $this->response->data['SUBPART'] = 'user_edit.html'; $msg = \Flash::instance(); if (isset($params['id'])) { // update existing $this->resource->load(array('_id = ?', $params['id'])); if ($f3->get('HOST') == 'ikkez.de' && !$this->resource->dry() && $this->resource->username == 'admin') { $msg->addMessage("You are not allowed to change the demo-admin", 'danger'); $f3->reroute('/admin/' . $params['module']); return; } } parent::post($f3, $params); }
/** * update/create post * @param \Base $f3 * @param array $params */ public function post(\Base $f3, $params) { parent::post($f3, $params); if ($this->response instanceof \View\Backend) { $this->initBackend(); } }
public function post(\Engine\IResponse $response) { parent::post($response); $response->sendData(["url" => $this->url->getUrl(), "method" => $this->method->getMethod(), "get" => $this->get, "post" => $this->post, "Provider\\Test" => $this->provider->get("Test")->checkIfWorking()]); }