Edits an existing WPSetup entity.
327101
public function updateAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();

        $entity = $em->getRepository('ACSACSPanelWordpressBundle:WPSetup')->find($id);

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

        $deleteForm = $this->createDeleteForm($id);
        $editForm = $this->createForm(new WPSetupType($this->container), $entity);
        $editForm->bind($request);

        if ($editForm->isValid()) {
            $em->persist($entity);
            $em->flush();

            return $this->redirect($this->generateUrl('wpsetup_edit', array('id' => $id)));
        }

        return $this->render('ACSACSPanelWordpressBundle:WPSetup:edit.html.twig', array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }
90031
public void saveImplementedVersion(Page page, Integer version) {
        Integer previousImplementedVersion = getImplementedVersion(page);
        if (previousImplementedVersion != null && version != null && previousImplementedVersion == version)
            return;

        if (previousImplementedVersion != null)
            savePreviousImplementedVersion(page, previousImplementedVersion);

        String value = version != null ? String.valueOf(version) : null;
        ContentEntityObject entityObject = getContentEntityManager().getById(page.getId());
        getContentPropertyManager().setStringProperty(entityObject, IMPLEMENTED_VERSION, value);
    }
103349
void internalAddChange(String valuePath, String attributeName, int valueIndex, ChangeType changeType) {

        m_changeTimer = null;
        //TODO: keep the IDs, otherwise redo will not work
        CmsEntity currentData = m_entity.cloneEntity();
        if (!currentData.equals(m_current.getEntityData())) {
            m_undo.push(m_current);
            m_current = new Change(currentData, valuePath, attributeName, valueIndex, changeType);
            m_redo.clear();
            fireStateChange();
        }
    }
249176
def to_modify(self, uid):
        '''
        
        '''

        kwd = {
            'pager': '',

        }
        self.render('wiki_page/page_edit.html',
                    postinfo=MWiki.get_by_uid(uid),
                    kwd=kwd,
                    cfg=CMS_CFG,
                    userinfo=self.userinfo)
217681
def edit(community):
    """"""
    form = EditCommunityForm(formdata=request.values, obj=community)
    deleteform = DeleteCommunityForm()
    ctx = mycommunities_ctx()
    ctx.update({
        'form': form,
        'is_new': False,
        'community': community,
        'deleteform': deleteform,
    })

    if form.validate_on_submit():
        for field, val in form.data.items():
            setattr(community, field, val)

        file = request.files.get('logo', None)
        if file:
            if not community.save_logo(file.stream, file.filename):
                form.logo.errors.append(_(
                    'Cannot add this file as a logo. Supported formats: '
                    'PNG, JPG and SVG. Max file size: 1.5 MB.'))

        if not form.logo.errors:
            db.session.commit()
            flash("Community successfully edited.", category='success')
            return redirect(url_for('.edit', community_id=community.id))

    return render_template(
        current_app.config['COMMUNITIES_EDIT_TEMPLATE'],
        **ctx
    )
786476
def edit(name)
      Editor.new(Looksee.editor).edit(lookup_path.object, name)
    end
1126071
def edit(self, name, mark=False):
        
        self.api.edit(self, name, mark)
1241402
def edit_type_view(request, semester, pk, profile=None):
    
    wtype = get_object_or_404(WorkshiftType, pk=pk)
    full_management = utils.can_manage(request.user, semester)
    any_management = utils.can_manage(request.user, semester, any_pool=True)

    if not any_management:
        messages.add_message(
            request,
            messages.ERROR,
            MESSAGES["ADMINS_ONLY"],
        )
        return HttpResponseRedirect(semester.get_view_url())

    if full_management:
        if "delete" in request.POST:
            messages.add_message(
                request,
                messages.INFO,
                "Workshift type deleted.",
            )
            wtype.delete()
            return HttpResponseRedirect(wurl(
                "workshift:list_types",
                sem_url=semester.sem_url,
            ))

    edit_form = WorkshiftTypeForm(
        data=request.POST if "edit" in request.POST else None,
        instance=wtype,
        prefix="edit",
        read_only=not full_management,
    )

    queryset = RegularWorkshift.objects.filter(
        workshift_type=wtype,
    )

    if not full_management:
        queryset = queryset.filter(
            pool__managers__incumbent__user=request.user,
        )

    shifts_formset = RegularWorkshiftFormSet(
        data=request.POST if "edit" in request.POST else None,
        prefix="shifts",
        queryset=queryset,
    )

    if edit_form.is_valid() and shifts_formset.is_valid():
        if full_management:
            wtype = edit_form.save()
        shifts_formset.save(wtype)
        return HttpResponseRedirect(wtype.get_view_url())

    page_name = "Edit {}".format(wtype.title)

    return render_to_response("edit_type.html", {
        "page_name": page_name,
        "shift": wtype,
        "edit_form": edit_form,
        "shifts_formset": shifts_formset,
    }, context_instance=RequestContext(request))
607930
private void updateAdd()
    {
        if (willAdd)
        {
            for (final Featurable featurable : toAdd)
            {
                featurables.add(featurable);
                for (final HandlerListener listener : listeners)
                {
                    listener.notifyHandlableAdded(featurable);
                }
                if (featurable.hasFeature(Transformable.class))
                {
                    final Transformable transformable = featurable.getFeature(Transformable.class);
                    transformable.teleport(transformable.getX(), transformable.getY());
                }
            }
            toAdd.clear();
            willAdd = false;
        }
    }
1295576
def edit(self, resource):
        
        schema = JobSchema(exclude=('id', 'status', 'options', 'package_name', 'config_name', 'device_name', 'result_id', 'user_id', 'created', 'updated', 'automatic', 'run_at'))
        json = self.service.encode(schema, resource)

        schema = JobSchema()
        resp = self.service.edit(self.base, resource.name, json)
        return self.service.decode(schema, resp)
628985
def edit(self, obj_id, parameters, create_if_not_exists=False):
        
        if create_if_not_exists:
            response = self._client.session.put(
                '{url}/{id}/edit'.format(
                    url=self.endpoint_url, id=obj_id
                ),
                data=parameters
            )
        else:
            response = self._client.session.patch(
                '{url}/{id}/edit'.format(
                    url=self.endpoint_url, id=obj_id
                ),
                data=parameters
            )
        return self.process_response(response)
108555
def edit(self, title, state=github.GithubObject.NotSet, description=github.GithubObject.NotSet, due_on=github.GithubObject.NotSet):
        
        assert isinstance(title, (str, unicode)), title
        assert state is github.GithubObject.NotSet or isinstance(state, (str, unicode)), state
        assert description is github.GithubObject.NotSet or isinstance(description, (str, unicode)), description
        assert due_on is github.GithubObject.NotSet or isinstance(due_on, datetime.date), due_on
        post_parameters = {
            "title": title,
        }
        if state is not github.GithubObject.NotSet:
            post_parameters["state"] = state
        if description is not github.GithubObject.NotSet:
            post_parameters["description"] = description
        if due_on is not github.GithubObject.NotSet:
            post_parameters["due_on"] = due_on.strftime("%Y-%m-%d")
        headers, data = self._requester.requestJsonAndCheck(
            "PATCH",
            self.url,
            input=post_parameters
        )
        self._useAttributes(data)
744361
public void edit(
        CmsClientSitemapEntry entry,
        List<CmsPropertyModification> propertyChanges,
        final CmsReloadMode reloadStatus) {

        CmsSitemapChange change = getChangeForEdit(entry, propertyChanges);
        final String updateTarget = ((reloadStatus == CmsReloadMode.reloadParent))
        ? getParentEntry(entry).getSitePath()
        : entry.getSitePath();
        Command callback = new Command() {

            public void execute() {

                if ((reloadStatus == CmsReloadMode.reloadParent) || (reloadStatus == CmsReloadMode.reloadEntry)) {
                    updateEntry(updateTarget);
                }
            }
        };
        if (change != null) {
            commitChange(change, callback);
        }
    }
989995
public function edit() {
		$config_path = $this->get_config_path();
		$contents    = file_get_contents( $config_path );
		$r           = Utils\launch_editor_for_input( $contents, 'wp-config.php', 'php' );
		if ( false === $r ) {
			WP_CLI::warning( 'No changes made to wp-config.php.', 'Aborted' );
		} else {
			file_put_contents( $config_path, $r );
		}
	}
689508
def edit(self, body):
        
        assert isinstance(body, (str, unicode)), body
        post_parameters = {
            "body": body,
        }
        headers, data = self._requester.requestJsonAndCheck(
            "PATCH",
            self.url,
            input=post_parameters
        )
        self._useAttributes(data)
30088
private void upsertAttributes(EntityType entityType, EntityType existingEntityType) {
    // analyze both compound and atomic attributes owned by the entity
    Map<String, Attribute> attrsMap =
        stream(entityType.getOwnAllAttributes())
            .collect(toMap(Attribute::getName, Function.identity()));
    Map<String, Attribute> existingAttrsMap =
        stream(existingEntityType.getOwnAllAttributes())
            .collect(toMap(Attribute::getName, Function.identity()));

    // determine attributes to add, update and delete
    Set<String> addedAttrNames = Sets.difference(attrsMap.keySet(), existingAttrsMap.keySet());
    Set<String> sharedAttrNames = Sets.intersection(attrsMap.keySet(), existingAttrsMap.keySet());
    Set<String> deletedAttrNames = Sets.difference(existingAttrsMap.keySet(), attrsMap.keySet());

    // add new attributes
    if (!addedAttrNames.isEmpty()) {
      dataService.add(ATTRIBUTE_META_DATA, addedAttrNames.stream().map(attrsMap::get));
    }

    // update changed attributes
    List<String> updatedAttrNames =
        sharedAttrNames
            .stream()
            .filter(
                attrName ->
                    !EntityUtils.equals(attrsMap.get(attrName), existingAttrsMap.get(attrName)))
            .collect(toList());
    if (!updatedAttrNames.isEmpty()) {
      dataService.update(ATTRIBUTE_META_DATA, updatedAttrNames.stream().map(attrsMap::get));
    }

    // delete removed attributes
    if (!deletedAttrNames.isEmpty()) {
      dataService.delete(ATTRIBUTE_META_DATA, deletedAttrNames.stream().map(existingAttrsMap::get));
    }
  }
58621
def to_add(self):
        '''
        
        '''
        kwd = {
            'pager': '',
        }
        self.render('misc/entity/entity_add.html',
                    cfg=config.CMS_CFG,
                    kwd=kwd,
                    userinfo=self.userinfo)