Edits an existing MenuItem entity.

@Route("/menuitemlabel/{id}", name="admin_menu_item_label_update")
@Method("PUT")
@Template("FlowcodePageBundle:AdminMenu:edit_itemmenu_label.html.twig")
358171
public function updateMenuItemLabelAction(Request $request, MenuItemLabel $menuItemLabel)
    {
        $em = $this->getDoctrine()->getManager();

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

        $editForm = $this->createForm($this->get("amulen.page.form.menuitemlabel"), $menuItemLabel, array(
            'action' => $this->generateUrl('admin_menu_item_label_update', array('id' => $menuItemLabel->getId())),
            'method' => 'PUT',
        ));
        $editForm->add('submit', 'submit', array('label' => 'Update'));
        $editForm->handleRequest($request);

        if ($editForm->isValid()) {

            $em->flush();

            return $this->redirect($this->generateUrl('admin_menu_items', array('id' => $menuItemLabel->getMenuItem()->getMenu()->getId())));
        }

        return array(
            'entity' => $menuItemLabel,
            'form' => $editForm->createView(),
        );
    }
473816
protected function addLinkRoute(ItemInterface $menu, $label, $route, $routeParameters = array())
    {
        $item = $menu->addChild($label, array('route' => $route, 'routeParameters' => $routeParameters, 'routeAbsolute' => UrlGeneratorInterface::ABSOLUTE_PATH));
        $item->setExtra('translation_domain', $this->translation_domain);

        if ($this->isCurrentUri($item->getUri())) {
            $this->setActive($item);
        }

        return $item;
    }
1091505
function( editor, buttonName, buttonLabel, commandName, command, menugroup, menuOrder )
	{
		editor.addCommand( commandName, command );

		// If the "menu" plugin is loaded, register the menu item.
		editor.addMenuItem( commandName,
			{
				label : buttonLabel,
				command : commandName,
				group : menugroup,
				order : menuOrder
			});
	}
891640
public function edit($id)
    {
        $this->request->allowMethod(['get', 'put']);

        $menu = $this->Menus->get($id);

        if ($this->request->is('put')) {
            $menu = $this->Menus->patchEntity($menu, $this->request->data);
            if ($this->Menus->save($menu)) {
                $this->Flash->success(__d('wasabi_core', 'The menu <strong>{0}</strong> has been saved.', $this->request->data['name']));
                $this->redirect(['action' => 'index']);
                return;
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }
        $this->set([
            'menu' => $menu,
            'menuItems' => $this->MenuItems->find('threaded', ['order' => ['lft' => 'ASC']])->where(['MenuItems.menu_id' => $id])->hydrate(false)
        ]);
        $this->render('add');
    }
958105
public function edit(string $id)
    {
        $entity = $this->DblistItems->get($id);

        if ($this->request->is(['patch', 'post', 'put'])) {
            $entity = $this->DblistItems->patchEntity($entity, (array)$this->request->getData());

            if ($this->DblistItems->save($entity)) {
                $this->Flash->success('The database list item has been saved.');

                return $this->redirect(['action' => 'index', $entity->get('dblist_id')]);
            }

            $this->Flash->error('The database list item could not be saved. Please, try again.');
        }

        $tree = $this->DblistItems->find('treeList', ['spacer' => '&nbsp;&nbsp;&nbsp;&nbsp;'])
            ->where(['dblist_id' => $entity->get('dblist_id')]);

        $this->set(compact('entity', 'tree'));
        $this->set('_serialize', ['entity']);
    }
247424
private void doUpdateDevelopMode() throws PageException {

	admin.updateMode(getBoolObject("admin", action, "mode"));
	store();
	adminSync.broadcast(attributes, config);
    }
729699
public function editAction()
    {
        // Load entity
        $entity = $this->getMapper()->findById($this->params('id'));
        if (!$entity) {
            // Add failure message
            $this->flashMessenger()
                    ->addMessage(
                            'That ' . strtolower($this->getEntityName())
                            . ' does not exist.'
            );
            return $this->redirect()->toRoute($this->indexRoute);
        }

        // Load form
        $form = $this->getForm('Edit' . $this->getEntityName());
        $form->bind($entity);

        // Implement Post/Redirect/Get pattern
        $prg = $this->prg();
        if ($prg instanceof Response) {
            return $prg;
        } else if (false !== $prg) {

            // Set form data
            $form->setData($prg);

            // Edit entity
            $result = $this->getService()->edit();
            if ($result) {
                return $this->redirect()->toRoute($this->indexRoute);
            }
        }

        // Set up view model
        $viewModel = new ViewModel(array(
            'entityName' => $this->getEntityName(),
            'form'       => $form,
        ));
        $viewModel->setTemplate('infinity-base/crud/edit');

        return $viewModel;
    }
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
551389
public function updateAction(ProductItemField $productitemfield, Request $request)
    {
        $editForm = $this->createForm($this->get("amulen.shop.form.product.item.field"), $productitemfield, array(
            'action' => $this->generateUrl('admin_productitemfield_update', array('id' => $productitemfield->getid())),
            'method' => 'PUT',
        ));
        if ($editForm->handleRequest($request)->isValid()) {
            $productitemSrv = $this->get('amulen.shop.product.item.field');
            $productitemSrv->uploadImage($productitemfield);
            $this->getDoctrine()->getManager()->flush();

            return $this->redirect($this->generateUrl('admin_productitemfield_show', array('id' => $productitemfield->getId())));
        }
        return $this->redirect($this->generateUrl('admin_productitemfield_show', array('id' => $productitemfield->getId())));
    }
746791
public function newPlacementAction(Request $request, $newMenuItemId, $menuItemId)
    {
        $sibling = $request->get('sibling');

        /** @var MenuItemManager $menuItemManager */
        $menuItemManager = $this->get('networking_init_cms.menu_item_manager');
        $newMenuItem = $menuItemManager->find($newMenuItemId);
        $menuItem = $menuItemManager->find($menuItemId);

        if (!$newMenuItem || !$menuItem) {
            throw new NotFoundHttpException();
        }

        $data = [];
        try {
            if ($sibling) {
                $menuItemManager->persistAsNextSiblingOf($newMenuItem, $menuItem);
            } else {
                $menuItemManager->persistAsFirstChildOf($newMenuItem, $menuItem);
            }
            $this->getDoctrine()->getManager()->flush();
            $data = [
                'result' => 'ok',
                'objectId' => $this->admin->getNormalizedIdentifier($newMenuItem),
            ];

            return $this->renderJson($data);
        } catch (\Exception $e) {
            return $this->renderJson($data);
        }
    }
297162
private void updateParentPath(String newParentPath, String oldParentPath) {

        String oldPath = getSitePath();
        String newPath = oldPath.replaceFirst(oldParentPath, newParentPath);
        getListItemWidget().setSubtitleLabel(newPath);
        for (Widget child : getChildren()) {
            ((CmsGalleryTreeItem)child).updateParentPath(newPath, oldPath);
        }
    }
18028
void updateItems(List<String> updatedItems) {

        Set<CmsUUID> ids = new HashSet<CmsUUID>();
        for (String id : updatedItems) {
            ids.add(new CmsUUID(id));
        }
        m_resultTable.update(ids, false);
    }
290841
public function addOrUpdate()
    {
        $this->request->allowMethod(['post']);
        if (!$this->request->is('ajax')) {
            throw new \RuntimeException('Wrong type of request!');
        }
        $params = is_array($this->request->getData()) ? $this->request->getData() : [];
        /**
         * @var \Cake\Datasource\EntityInterface $translation
         */
        $translation = $this->Translations->getTranslations(
            $params['object_model'],
            $params['object_foreign_key'],
            [
                'language' => $params['language_id'],
                'toEntity' => true,
                'field' => $params['object_field'],
            ]
        );
        if (empty($translation)) {
            /**
             * @var \Cake\Datasource\EntityInterface $translation
             */
            $translation = $this->Translations->newEntity();
        }

        $translation = $this->Translations->patchEntity($translation, $params);
        $result = $this->Translations->save($translation);
        $body = (string)json_encode(!empty($result) ? true : false);
        $this->response = $this->response->withType('application/json')->withStringBody($body);
        $this->autoRender = false;
    }
1362001
private function createMenuItemCreateForm(MenuItem $entity)
    {
        $form = $this->createForm(new MenuItemType(), $entity, array(
            'action' => $this->generateUrl('admin_menu_item_create', array('id' => $entity->getMenu()->getId())),
            'method' => 'POST',
        ));

        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
866565
public function newAction(Request $request, MenuItem $menuItemId)
    {
        $entity = new MenuItem();
        $form   = $this->createForm('CoreExtraBundle\Form\SubMenuItemType', $entity);
        $form->handleRequest($request);
        
        if ($form->isSubmitted() && $form->isValid()) {
            $em = $this->getDoctrine()->getManager();
            $entity->getParentMenuItem($menuItemId);
            $em->persist($entity);
            $em->flush();
            
            //images
            $image = $form->getNormData()->getImage();
            if ($image instanceof Image) {
                $this->get('core_manager')->uploadMenuImage($entity);
            }
            
            $this->get('session')->getFlashBag()->add('success', 'menu.created');

            return $this->redirectToRoute('coreextra_menuitem_show', array('id' => $entity->getId()));
        }
        
        return array(
            'entity' => $entity,
            'menuitem' => $menuItemId,
            'form'   => $form->createView(),
        );
    }
1256854
function(e,a){
		 this.ddlist.addItem({label: this.el.value});
		 this.el.value = "";
		 this.hiddenEl.value = "";
   	this.fireUpdatedEvt();

	 }
34488
public
    function update(Validator $request)
    {
        $init = new InitData($request);
        Model::quickUpdate($init->getDataForEdit());
        flash()->success('Your Item Updated');
        return redirect()->to("/menus");
    }