edit method

@throws NotFoundException
@param string $id
@return void
349520
public function edit($id = null) {
		if (!$this->AfipFactura->exists($id)) {
			throw new NotFoundException(__('Invalid afip factura'));
		}
		if ($this->request->is(array('post', 'put'))) {
			if ($this->AfipFactura->save($this->request->data)) {
				$this->Session->setFlash(__('The afip factura has been saved.'));
				return $this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash(__('The afip factura could not be saved. Please, try again.'));
			}
		} else {
			$options = array('conditions' => array('AfipFactura.' . $this->AfipFactura->primaryKey => $id));
			$this->request->data = $this->AfipFactura->find('first', $options);
		}
		$mesas = $this->AfipFactura->Mesa->find('list');
		$this->set(compact('mesas'));
	}
1234038
public function edit(string $id = null): void
    {
        $menuItem = $this->MenuItems->get($id, [
            'contain' => ['Menus']
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $data = (array)$this->request->getData();
            $menuItem = $this->MenuItems->patchEntity($menuItem, $data);
            if ($this->MenuItems->save($menuItem)) {
                $this->Flash->success((string)__('The menu item has been saved.'));
                $this->redirect(['controller' => 'Menus', 'action' => 'view', $menuItem->get('menu')->get('id')]);

                return;
            } else {
                $this->Flash->error((string)__('The menu item could not be saved. Please, try again.'));
            }
        }

        $parentMenuItems = $this->MenuItems
            ->find('treeList', ['spacer' => self::TREE_SPACER])
            ->where(['MenuItems.menu_id' => $menuItem->get('menu')->get('id'), 'MenuItems.id !=' => $id]);

        $this->set(compact('menuItem', 'parentMenuItems'));
        $this->set('_serialize', ['menuItem']);
    }
1339082
protected function _edit($id) {
		try {
			$result = $this->{$this->modelClass}->edit($id, $this->request->data);
		} catch (OutOfBoundsException $e) {
			return $this->alert($e, array('redirect' => $this->referer(array('action' => 'list'), true)));
		}

		$this->request->data = $this->{$this->modelClass}->data;

		if (!empty($this->request->data[$this->{$this->modelClass}->alias][$this->{$this->modelClass}->displayField])) {
			$this->_appendToCrumb($this->request->data[$this->{$this->modelClass}->alias][$this->{$this->modelClass}->displayField]);
		}

		if (false === $result) {
			$this->alert('save.fail');
		} else if ($this->request->is('put')) {
			$this->alert('save.success');
		}
	}
1309657
public function edit($id)
    {
        $this->loadModel('Menu.MenuLinks');
        $this->loadModel('Content.Contents');
        $link = $this->MenuLinks->get($id, ['contain' => ['Menus']]);

        if (!empty($this->request->data)) {
            $link = $this->MenuLinks->patchEntity($link, $this->request->data, [
                'fieldList' => [
                    'title',
                    'url',
                    'description',
                    'target',
                    'expanded',
                    'active',
                    'activation',
                    'status'
                ]
            ]);

            if ($this->MenuLinks->save($link, ['associated' => false])) {
                $this->Flash->success(__d('menu', 'Link has been updated'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('menu', 'Link could not be updated, please check your information'));
            }
        }

        $contentLinks = [];
        $contents = $this->Contents
            ->find()
            ->select(['id', 'slug', 'content_type_slug', 'title'])
            ->all();
        foreach ($contents as $content) {
            $contentLinks[$content->get('url')] = __d('menu', '{0} [{1}]', $content->title, $content->content_type_slug);
        }

        $this->title(__d('menu', 'Editing Link'));
        $this->set(compact('link', 'contentLinks'));
        $this->Breadcrumb
            ->push('/admin/menu/manage')
            ->push(__d('menu', 'Editing menu'), ['plugin' => 'Menu', 'controller' => 'manage', 'action' => 'edit', $link->menu_id])
            ->push(__d('menu', 'Links'), ['plugin' => 'Menu', 'controller' => 'links', 'action' => 'menu', $link->menu_id])
            ->push(__d('menu', 'Editing link'), '#');
    }
645037
public function edit($id)
    {
        $admin = $this->adminRepository->find($id);

        if (is_null($admin)) {
            return Redirect::route('admin.admin.index');
        }

        $authorizes = $this->adminPermissionRepository->authorizes;

        return view('admin::admin.edit')
            ->with('admin', $admin)
            ->with('authorizes', $authorizes);
    }
339665
public function edit(string $id = null): void
    {
        $menu = $this->Menus->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $data = (array)$this->request->getData();
            $menu = $this->Menus->patchEntity($menu, $data);
            if ($this->Menus->save($menu)) {
                $this->Flash->success((string)__('The menu has been saved.'));
                $this->redirect(['action' => 'index']);

                return;
            } else {
                $this->Flash->error((string)__('The menu could not be saved. Please, try again.'));
            }
        }
        $this->set('navMenu', $menu);
        $this->set('_serialize', ['navMenu']);
    }
1056018
public function edit($id)
    {
        $user = $this->service->find($id);
        return view('admin.users.edit')->with('user', $user);
    }
390808
public function edit()
    {
        $id = $this->Auth->user('id');
        $user = $this->Users->find()->where(['id' => $id])->first();
        if (!$user) {
            throw new NotFoundException('User could not be found');
        }
            
        $user->accessible('password', true);
        if ($this->request->is(['post', 'put'])) {
            $user = $this->Users->patchEntity($user, $this->request->data);
            $this->Users->save($user);
        }
        $this->set(compact('user'));
    }
872267
public function edit(string $id = null)
    {
        $permission = $this->Permissions->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $permission = $this->Permissions->patchEntity($permission, (array)$this->request->getData());
            $this->Permissions->save($permission) ?
                $this->Flash->success((string)__('The  permission has been saved.')) :
                $this->Flash->error((string)__('The  permission could not be saved. Please, try again.'));

            return $this->redirect(['action' => 'index']);
        }
        $this->set(compact('permission'));
        $this->set('_serialize', ['permission']);
    }
777782
public function edit($id)
    {
        $this->loadModel('Menu.Menus');
        $menu = $this->Menus->get($id);

        if ($this->request->data()) {
            $menu = $this->Menus->patchEntity($menu, $this->request->data(), [
                'fieldList' => [
                    'title',
                    'description',
                    'settings',
                ],
                'validate' => false
            ]);

            if ($this->Menus->save($menu, ['atomic' => true])) {
                $this->Flash->success(__d('menu', 'Menu has been saved!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('menu', 'Menu could not be saved, please check your information'));
            }
        }

        $this->title(__d('menu', 'Editing Menu'));
        $this->set('menu', $menu);
        $this->Breadcrumb
            ->push('/admin/menu/manage')
            ->push(__d('menu', 'Editing menu {0}', $menu->title), '#');
    }
1268754
public function editAction($id)
        {

            /** @var Customer $oCustomer */
            $oCustomer = CustomerQuery::create()->findOneById($id);

            if (count($oCustomer) === 0) {
                throw $this->createNotFoundException('Unable to find Customer entity.');
            }

            $oEditForm   = $this->createEditForm($oCustomer);
            $oDeleteForm = $this->createDeleteForm($id);

            return $this->render('SlashworksAppBundle:Customer:edit.html.twig', array(
                'entity'      => $oCustomer,
                'edit_form'   => $oEditForm->createView(),
                'delete_form' => $oDeleteForm->createView(),
            ));
        }
908636
public function edit($id = null) {
		$block = $this->Blocks->get($id, [
			'contain' => []
		]);
		if ($this->request->is(['patch', 'post', 'put'])) {
			$block = $this->Blocks->patchEntity($block, $this->request->data);
			if ($this->Blocks->save($block)) {
				$this->Flash->success('The block has been saved.');
				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error('The block could not be saved. Please, try again.');
			}
		}
		$this->set(compact('block'));
	}
631266
public function edit($id)
    {
        $this->request->allowMethod(['get', 'put']);

        /** @var Page $page */
        $page = $this->Pages->get($id, ['contain' => ['Current', 'Attributes', 'Collections']]);

        ThemeManager::theme(Wasabi::setting('Cms.Theme.id'));

        if ($this->request->is('put')) {
            $page = $this->Pages->patchEntity($page, $this->request->data);
            if ($this->Pages->save($page)) {
                $this->Flash->success(__d('wasabi_cms', 'The page <strong>{0}</strong> has been saved.', $page->name));
                $this->redirect(['action' => 'index']);
                return;
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        } else {
            /** @var Content $current */
            $current = $page->current;
            if (!is_array($current) &&
                get_class($current) === 'Wasabi\Cms\Model\Entity\Content' &&
                $current->isNew()
            ) {
                $defaultLayout = ThemeManager::theme()->getLayout('Default');
                $page->current = [
                    (new Content())->set('content', json_encode($defaultLayout->content()))
                ];
            }
        }

        if ($page->meta_robots_index === null) {
            $page->meta_robots_index = (bool)Configure::read('Settings.Cms.SEO.meta-robots-index');
        }

        if ($page->meta_robots_follow === null) {
            $page->meta_robots_follow = (bool)Configure::read('Settings.Cms.SEO.meta-robots-follow');
        }

        $routes = $this->Routes
            ->findAllFor('Wasabi/Cms.Pages', $id, Wasabi::contentLanguage()->id)
            ->order([$this->Routes->aliasField('url') => 'asc']);

        $this->set([
            'page' => $page,
            'layouts' => ThemeManager::theme()->getLayoutsForSelect(),
            'availableModules' => ModuleManager::getAvailableModules(),
            'changeAttributesUrl' => Router::url([
                'plugin' => 'Wasabi/Cms',
                'controller' => 'Pages',
                'action' => 'attributes'
            ]),
            'attributes' => $page->getLayout()->attributes(),
            'routes' => $routes,
            'routeTypes' => RouteTypes::getForSelect(),
            'formRoute' => $this->Routes->newEntity([
                'type' => ($routes->count() >= 1) ? RouteTypes::TYPE_REDIRECT_ROUTE : RouteTypes::TYPE_DEFAULT_ROUTE
            ])
        ]);

        $this->render('add');
    }
208140
public
    function edit($id)
    {
        return $this->view(["row" => Model::findOrFail($id),'template'=>Template::pluck('title','id')->toArray()], "pages::admin.edit");
        //
    }
1290404
public function edit($id = null) {
		$country = $this->Countries->get($id);

		if ($this->Common->isPosted()) {
			$country = $this->Countries->patchEntity($country, $this->request->getData());
			if ($this->Countries->save($country)) {
				$name = $country['name'];
				$this->Flash->success(__('record edit {0} saved', h($name)));
				return $this->redirect(['action' => 'index']);
			}

			$this->Flash->error(__('record edit not saved'));
		}

		$this->set(compact('country'));
	}
629764
public function edit($id)
    {
        $this->loadModel('Taxonomy.Vocabularies');
        $vocabulary = $this->Vocabularies->get($id);

        if ($this->request->data()) {
            $vocabulary = $this->Vocabularies->patchEntity($vocabulary, $this->request->data, [
                'fieldList' => [
                    'name',
                    'description',
                ],
            ]);

            if ($this->Vocabularies->save($vocabulary, ['atomic' => true])) {
                $this->Flash->success(__d('taxonomy', 'Vocabulary has been saved!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('taxonomy', 'Vocabulary could not be saved, please check your information'));
            }
        }

        $this->title(__d('taxonomy', 'Editing Vocabulary'));
        $this->set('vocabulary', $vocabulary);
        $this->Breadcrumb
            ->push('/admin/system/structure')
            ->push(__d('taxonomy', 'Taxonomy'), '/admin/taxonomy/manage')
            ->push(__d('taxonomy', 'Vocabularies'), ['plugin' => 'Taxonomy', 'controller' => 'vocabularies', 'action' => 'index'])
            ->push(__d('taxonomy', 'Editing vocabulary'), '#');
    }
453041
public function edit($id)
    {
        $configuration = Configuration::findOrFail($id);
        $should_serialize = Setting::is_serialized($configuration->value);
        $default_serialized = Setting::is_serialized($configuration->default);

        return view('ticketit::admin.configuration.edit', compact('configuration', 'should_serialize', 'default_serialized'));
    }