Update one EventCallbackUrl
@param string $id
@param EventCallbackUrl $eventCallbackUrl
@return array
13082
public function update($id, EventCallbackUrl $eventCallbackUrl)
    {
        $response = $this->mailjet->put(Resources::$Eventcallbackurl, ['id' => $id, 'body' => $eventCallbackUrl->format()]);
        if (!$response->success()) {
            $this->throwError("EventCallbackUrlService:update() failed", $response);
        }

        return $response->getData();
    }
1067947
public function get($id, array $data, $className, callable $findOneCallable, callable $update)
    {
        try {
            DataObject::assertPut($data, $this->serializer, $className, $this->errorBag);

            $model = $findOneCallable();

            if (empty($model)) {
                $mapping = $this->serializer->getTransformer()->getMappingByClassName($className);

                return $this->resourceNotFound(new ErrorBag([new NotFoundError($mapping->getClassAlias(), $id)]));
            }
            $values = DataObject::getAttributes($data, $this->serializer);
            $update($model, $data, $values, $this->errorBag);

            $response = $this->resourceUpdated($this->serializer->serialize($model));
        } catch (Exception $e) {
            $response = $this->getErrorResponse($e);
        }

        return $response;
    }
66406
public function update($id)
    {
        /** @var FormRequest $request */
        $request = app($this->getUpdateRequestClass());
        $record  = $this->modelRepository->findOrFail($id);

        $data = $request->only($this->getRelevantFormFieldKeys());

        /** @var FormDataStorerInterface $storer */
        $storer = app(FormDataStorerInterface::class);
        $storer->setModelInformation($this->getModelInformation());

        if ( ! $storer->store($record, $data)) {
            // @codeCoverageIgnoreStart
            return redirect()->back()
                ->withInput()
                ->withErrors([
                    static::GENERAL_ERRORS_KEY => [ $this->getGeneralStoreFailureError() ],
                ]);
            // @codeCoverageIgnoreEnd
        }

        $this->storeActiveTab($request->input(static::ACTIVE_TAB_PANE_KEY));

        cms_flash(
            cms_trans(
                'models.store.success-message-edit',
                [ 'record' => $this->getSimpleRecordReference($id, $record) ]
            ),
            FlashLevel::SUCCESS
        );

        event( new Events\ModelUpdatedInCms($record) );

        if ($request->input(static::SAVE_AND_CLOSE_KEY)) {
            return redirect()->route("{$this->routePrefix}.index");
        }

        return redirect()->route("{$this->routePrefix}.edit", [ $record->getKey() ]);
    }
770910
public function updateTask($id, $options=array()){

        $data = array();
        
        $data['id'] = $id;

        $data = array_merge($data, $options);

        return $this->request($this->updateTaskUrl, $data);
    }
598897
public function update(Request $request, $id)
    {
        return (strtoupper($request->getMethod()) === 'PUT') ? $this->putAction($request,
            $id) : $this->patchAction($request, $id);
    }
904188
public function fieldsFor($id, $obj, callable $callback){
		$this->context->fieldsFor($id, $obj, $callback);
	}
1097127
public function fn($id, $callable = null, $needsContainer = false)
    {
        if ($callable === null) {
            $callable = $id;
        }
        if (!is_callable($callable)) {
            throw new \InvalidArgumentException("Not callable");
        }
        $this->set($id, array($callable, $needsContainer));
    }
1017152
public static function update(
        int $oauthClientId,
        int $oauthCallbackUrlId,
        string $url = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [static::determineUserId(), $oauthClientId, $oauthCallbackUrlId]
            ),
            [self::FIELD_URL => $url],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
1329670
public function updateEmailContent($emailId, $args = array(), $returnRaw = false)
    {
        $args['id'] = $emailId;

        return $this->getResult('updateEmailContent', $args, false, $returnRaw);
    }
805598
protected function responseGetById($id, $findCallback)
    {
        $entity = $findCallback($id);

        if (!$entity) {
            $exception = new EntityNotFoundException(self::$entityName, $id);
            // Return a 404 together with an error message, given by the exception, if the entity is not found
            $view = $this->view(
                $exception->toArray(),
                404
            );
        } else {
            $view = $this->view($entity, 200);
        }

        return $view;
    }
126957
public static function transformUrl($url, $id, $key = '')
    {
        return str_replace(!empty($key) ? $key : ':id', $id, $url);
    }
1160880
public function responseDelete($id, $deleteCallback)
    {
        try {
            $deleteCallback($id);
            $view = $this->view(null, 204);
        } catch (EntityNotFoundException $enfe) {
            $view = $this->view($enfe->toArray(), 404);
        } catch (RestException $re) {
            $view = $this->view($re->toArray(), 400);
        }

        return $view;
    }
678623
public function editContactEvent($contactId, $eventId, array $parameters)
    {
        return $this->makeRequest($this->endpoint.'/'.$eventId.'/contact/'.$contactId.'/edit', $parameters, 'PUT');
    }
755774
public function registerLink(
            string $elmId, 
            string $uriPattern, 
            array  $uriParams, 
            string $event    = self::EVENT_CLIC, 
            string $targetId = null)
    {
        $selector = '$("#' . $elmId . '").';
        $replaces = [];
        foreach ($uriParams as $key => $value) {
            $replaces[] = "replace('" . $key . "', " . $selector . $value . ')';
        }
        $target = $targetId ? ", '" . $targetId . "'" : '';
        $callOptions = "'" . $uriPattern . "'." . implode('.', $replaces) . $target;
        $script  = $selector . $event;
        $script .= '(function(e){e.preventDefault();$.ajaxCall(' . $callOptions . ')});';
        return $this->registerScript($script);
    }
1324834
public static function update(array $id = [], array $data = [], ClientInterface $client = null)
    {
        return (new RequestService($client))
            ->setResourceClass(static::class)
            ->setResourcePath(static::RESOURCE_PATH . "/:" . static::RESOURCE_ID)
            ->update($id, $data);
    }
772982
public function getUpdateRequest($id, $updateBind)
    {
        $db = $this->_getConnection();
        $table = $this->table;
        $self = $this;
        $primary = $this->_getPrimaryKetArray();

        $request = new StorageDataRequest(
            [$id, $updateBind],
            function ($id, $updateBind) use ($db, $table, $self, $primary) {
                if (!$db) {
                    $self->logError('Missing connection on getUpdateRequest on table: ' . $table);
                    return false;
                }

                $keyBind = $self->prepareKey($primary, $id);

                $whereBind = $self->prepareBind($keyBind, $db);
                $whereArray = [];
                foreach ($whereBind as $key => $value) {
                    $whereArray[] = $key . ' = ' . $value;
                }

                $keys = [];
                $values = [];

                $updateBind = $self->prepareBind($updateBind, $db);

                foreach ($updateBind as $key => $value) {
                    $keys[] = $key;
                    $values[] = $value;
                }

                $query = 'UPDATE ' . $table
                    . ' SET (' . implode(',', $keys) . ') = ROW(' . implode(',', $values) . ') '
                    . ' WHERE ' . implode(' AND ', $whereArray)
                    . ' RETURNING *';
                $stmnt = $db->query($query);

                if (!$stmnt) {
                    $this->logError('Cannot execute getUpdateRequest on table: ' . $table . ':' . implode(',', $db->errorInfo()), [
                        'code' => $db->errorCode(),
                    ]);

                    return false;
                }

                $result = $stmnt->fetch(PDO::FETCH_ASSOC);

                if (!$result && (int) $stmnt->errorCode() > 0) {
                    $this->logError('Error on execution on getUpdateRequest on table: ' . $table . ':' . implode(',',
                            $stmnt->errorInfo()), [
                        'code' => $stmnt->errorCode(),
                    ]);

                    return false;
                }

                return $result;
            });

        return $request;
    }
1354868
public function updateAction(Request $request, $id)
    {
        $this->registerBreadcrubms()->addItem($this->get("translator")->trans("Edit"));

        $entity = $this->getRepository()->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find ' . $this->getEntityName() . '.');
        }

        $form = $this->createEditForm($entity);

        $form->handleRequest($request);

        if ($form->isValid()) {
            /**
             * @var $em \Doctrine\ORM\EntityManager
             */
            $em = $this->getDoctrine()->getManager();

            try {
                if ($form->get("saveAndPublish")->isClicked()) {
                    $entity->setPublished(1);
                }
            } catch (OutOfBoundsException $e) {

            }

            if ($em->getUnitOfWork()->isScheduledForUpdate($entity)) {
                $this->get('session')->getFlashBag()->add('success', $this->getEntityName() . ' has been updated!');
            }

            $em->persist($entity);

            if (method_exists($entity, 'mergeNewTranslations')) {
                $entity->mergeNewTranslations();
            }

            $em->flush();

            if ($form->get("saveAndExit")->isClicked()) {
                return $this->redirect($this->generateUrl($this->getRouteName(), $this->getRouteParams()));
            } else {
                return $this->redirect($this->generateUrl($this->getRouteName() . 'Edit', $this->getRouteParams(['id' => $id])));
            }
        }

        return $this->render($this->getListTemplate() . ":edit.html.twig", [
            'entity' => $entity,
            'form' => $form->createView()
        ]);
    }