Show the form for editing the specified resource.
@param  int $id
@return View
559037
public function edit($id)
    {
        $data['data'] = $this->config->getModel()::findOrFail($id);
        $data['app'] = $this->config->tabbable($data['data']);

        $validator = JsValidator::make($this->config->getValid($id));
        View::share('validator', $validator);

        return view('larrock::admin.admin-builder.edit', $data);
    }
540778
public function edit($id)
    {
        $roles = Role::select('id', 'name', 'label')->get();
        $roles = $roles->pluck('label', 'name');

        $user = User::with('roles')->select('id', 'name', 'email')->findOrFail($id);
        $user_roles = [];
        foreach ($user->roles as $role) {
            $user_roles[] = $role->name;
        }

        return view('admin.users.edit', compact('user', 'roles', 'user_roles'));
    }
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);
    }
82875
public function edit($id)
	{
		return $this->response()
			->view($this->getView('edit'), [
				'entity' => $this->getModel()->getRepository()->getById($id)
			]);
	}
58606
public function getPostEditAdmin($id)
    {
        $this->di->get("auth")->isAdmin(true);

        $title      = "Admin - Redigera profil";
        $card       = "Redigera";
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");
        $form       = new EditAdminForm($this->di, $id);

        $form->check();

        $data = [
            "form" => $form->getHTML(),
            "card" => $card,
            "title" => $title,
        ];

        $view->add("admin/edit", $data);

        $pageRender->renderPage(["title" => $title]);
    }
344742
public function actionEdit($id)
    {
        $model = $this->findModel($id);
        $form  = new LanguageForm($model);
        if (Yii::$app->request->isAjax && $form->load(Yii::$app->request->post())){
            if (!$errors = ActiveForm::validate($form)) {
                try {
                    $this->service->edit($form->id, $form);
                    $this->output['status'] = 1;
                } catch (YiiException $e) {
                    $errors = ErrorHelper::checkModel($e->data, $form);
                }
            }
            return $this->output['errors'] = $errors;
        }
        return $this->render('edit', ['model' => $form]);
    }
476100
public function edit($id) {
        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $response = 'This category is not available for editing, as someone else is currently editing this category';
            Session::flash('message', $response);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.categories.index');
        }

        // Lock the record
        $this->repository->populateLockFields($id);

        $categories = $this->repository->getAll();

        return view('lasallecmsadmin::'.config('lasallecmsadmin.admin_template_name').'/categories/create',[
            'pagetitle'                      => 'Categories',
            'field_list'                     => $this->model->field_list,
            'namespace_formprocessor'        => $this->model->namespace_formprocessor,
            'classname_formprocessor_update' => $this->model->classname_formprocessor_update,
            'DatesHelper'                    => DatesHelper::class,
            'DatesHelper'                    => DatesHelper::class,
            'Form'                           => Form::class,
            'HTMLHelper'                     => HTMLHelper::class,
            'category'                       => $this->repository->getFind($id),
            // record exists solely so the edit form works with the formhandler's featured image blade view
            'record'                         => $this->repository->getFind($id),
            'categories'                     => $categories,
            'admin_size_input_text_box'      => Config::get('lasallecmsadmin.admin_size_input_text_box'),
        ]);
    }
741546
public function edit($id)
    {
        // Fetch the role object
        // $id = $this->decode($hash);
        $role = $this->roleRepository->findById($id);

        if ($role) {
            return view('Centaur::roles.edit')
                ->with('role', $role);
        }

        session()->flash('error', 'Invalid role.');
        return redirect()->back();
    }
1302114
public function edit($id)
    {
        $this->breadcrumb->onEditDevice($id);
        $model = app(LogsLoginDevices::class)->findOrFail($id);
        $form  = new DeviceForm($model);
        return view('antares/logger::admin.devices.edit', compact('form'));
    }
1093642
public function show($id)
    {
        $template = $this->client->get(sprintf('templates/%d.json', $id));

        return new Template($this->response($template));
    }
283307
public function editAction($id = null)
    {
        $request = $this->getRequest();
        // the key used to lookup the template
        $templateKey = 'edit';

        $id = $request->get($this->admin->getIdParameter());
        $existingObject = $this->admin->getObject($id);

        if (!$existingObject) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id: %s', $id));
        }

        $this->checkParentChildAssociation($request, $existingObject);

        $this->admin->checkAccess('edit', $existingObject);

        $preResponse = $this->preEdit($request, $existingObject);
        if (null !== $preResponse) {
            return $preResponse;
        }

        $this->admin->setSubject($existingObject);
        $objectId = $this->admin->getNormalizedIdentifier($existingObject);

        $form = $this->admin->getForm();

        if (!\is_array($fields = $form->all()) || 0 === \count($fields)) {
            throw new \RuntimeException(
                'No editable field defined. Did you forget to implement the "configureFormFields" method?'
            );
        }

        $form->setData($existingObject);
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $isFormValid = $form->isValid();

            // persist if the form was valid and if in preview mode the preview was approved
            if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {
                $submittedObject = $form->getData();
                $this->admin->setSubject($submittedObject);

                try {
                    $existingObject = $this->admin->update($submittedObject);

                    if ($this->isXmlHttpRequest()) {
                        return $this->renderJson([
                            'result' => 'ok',
                            'objectId' => $objectId,
                            'objectName' => $this->escapeHtml($this->admin->toString($existingObject)),
                        ], 200, []);
                    }

                    $this->addFlash(
                        'sonata_flash_success',
                        $this->trans(
                            'flash_edit_success',
                            ['%name%' => $this->escapeHtml($this->admin->toString($existingObject))],
                            'SonataAdminBundle'
                        )
                    );

                    // redirect to edit mode
                    return $this->redirectTo($existingObject);
                } catch (ModelManagerException $e) {
                    $this->handleModelManagerException($e);

                    $isFormValid = false;
                } catch (LockException $e) {
                    $this->addFlash('sonata_flash_error', $this->trans('flash_lock_error', [
                        '%name%' => $this->escapeHtml($this->admin->toString($existingObject)),
                        '%link_start%' => '<a href="'.$this->admin->generateObjectUrl('edit', $existingObject).'">',
                        '%link_end%' => '</a>',
                    ], 'SonataAdminBundle'));
                }
            }

            // show an error message if the form failed validation
            if (!$isFormValid) {
                if (!$this->isXmlHttpRequest()) {
                    $this->addFlash(
                        'sonata_flash_error',
                        $this->trans(
                            'flash_edit_error',
                            ['%name%' => $this->escapeHtml($this->admin->toString($existingObject))],
                            'SonataAdminBundle'
                        )
                    );
                }
            } elseif ($this->isPreviewRequested()) {
                // enable the preview template if the form was valid and preview was requested
                $templateKey = 'preview';
                $this->admin->getShow();
            }
        }

        $formView = $form->createView();
        // set the theme for the current Admin Form
        $this->setFormTheme($formView, $this->admin->getFormTheme());

        // NEXT_MAJOR: Remove this line and use commented line below it instead
        $template = $this->admin->getTemplate($templateKey);
        // $template = $this->templateRegistry->getTemplate($templateKey);

        return $this->renderWithExtraParams($template, [
            'action' => 'edit',
            'form' => $formView,
            'object' => $existingObject,
            'objectId' => $objectId,
        ], null);
    }
251843
public function editAction($id = null)
    {
        $request = $this->getRequest();
        $this->manager = $this->getDoctrine()->getManager();
        // the key used to lookup the template
        $templateKey = 'edit';

        $id = $request->get($this->admin->getIdParameter());
        $object = $this->admin->getObject($id);

        if (!$object) {
            throw $this->createNotFoundException(sprintf('unable to find the object with id : %s', $id));
        }

        $this->admin->checkAccess('edit', $object);

        $preResponse = $this->preEdit($request, $object);
        if ($preResponse !== null) {
            return $preResponse;
        }

        $this->admin->setSubject($object);

        /** @var $form Form */
        $form = $this->admin->getForm();
        $form->setData($object);
        $form->handleRequest($request);

        $this->handleFiles($object);

        if ($form->isSubmitted()) {
            //TODO: remove this check for 3.0
            if (method_exists($this->admin, 'preValidate')) {
                $this->admin->preValidate($object);
            }
            $isFormValid = $form->isValid();

            // persist if the form was valid and if in preview mode the preview was approved
            if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {
                try {
                    $object = $this->admin->update($object);

                    if ($this->isXmlHttpRequest()) {
                        return $this->renderJson(array(
                                    'result'     => 'ok',
                                    'objectId'   => $this->admin->getNormalizedIdentifier($object),
                                    'objectName' => $this->escapeHtml($this->admin->toString($object)),
                                        ), 200, array());
                    }

                    $this->addFlash(
                        'sonata_flash_success',
                        $this->admin->trans(
                            'flash_edit_success',
                            array('%name%' => $this->escapeHtml($this->admin->toString($object))),
                            'SonataAdminBundle'
                        )
                    );

                    // redirect to edit mode
                    return $this->redirectTo($object);
                } catch (ModelManagerException $e) {
                    $this->handleModelManagerException($e);

                    $isFormValid = false;
                } catch (LockException $e) {
                    $this->addFlash('sonata_flash_error', $this->admin->trans('flash_lock_error', array(
                                '%name%'       => $this->escapeHtml($this->admin->toString($object)),
                                '%link_start%' => '<a href="' . $this->admin->generateObjectUrl('edit', $object) . '">',
                                '%link_end%'   => '</a>',
                                    ), 'SonataAdminBundle'));
                }
            }

            // show an error message if the form failed validation
            if (!$isFormValid) {
                if (!$this->isXmlHttpRequest()) {
                    $this->addFlash(
                        'sonata_flash_error',
                        $this->admin->trans(
                            'flash_edit_error',
                            array('%name%' => $this->escapeHtml($this->admin->toString($object))),
                            'SonataAdminBundle'
                        )
                    );
                }
            } elseif ($this->isPreviewRequested()) {
                // enable the preview template if the form was valid and preview was requested
                $templateKey = 'preview';
                $this->admin->getShow();
            }
        }

        $view = $form->createView();

        // set the theme for the current Admin Form
        $this->defineFormTheme($view, $this->admin->getFormTheme());

        return $this->render($this->admin->getTemplate($templateKey), array(
                    'action' => 'edit',
                    'form'   => $view,
                    'object' => $object,
                        ), null);
    }
95967
public function edit($id) {
		$dep        = Dep::find($id);
		$department = Dep::where('parent', null)->pluck('name_'.app('l'), 'id');
		return view('admin.department.edit', ['title' => trans('admin.edit'),
				'department'                                => $department,
				'edit'                                      => $dep,
			]);
	}
779812
public function edit($id)
    {
        try
        {
            $group = $this->groups->findById($id);

            $groupPermissions = $group->getPermissions();
            $genericPermissions = $this->permissions->generic();
            $modulePermissions = $this->permissions->module();


            return View::make(Config::get('cpanel::views.groups_edit'))
                ->with('group',$group)
                ->with('genericPermissions',$genericPermissions)
                ->with('modulePermissions',$modulePermissions)
                ->with('groupPermissions',$groupPermissions);
        }
        catch ( GroupNotFoundException $e)
        {
            return Redirect::route('admin.groups.index')->with('error', $e->getMessage());
        }
    }
339360
public function edit($id)
    {
        // Fetch the user object
        // $id = $this->decode($hash);
        $user = $this->userRepository->findById($id);

        // Fetch the available roles
        $roles = app()->make('sentinel.roles')->createModel()->all();

        if ($user) {
            return view('Centaur::users.edit', [
                'user' => $user,
                'roles' => $roles
            ]);
        }

        session()->flash('error', 'Invalid user.');
        return redirect()->back();
    }
732986
public function edit($id)
    {
        if (! $role = $this->role->find($id)) {
            flash(trans('core::messages.resource.resource not found', ['name' => trans('user::roles.title.role')]));

            return redirect()->route('backend::user.role.index');
        }

        return view('user::backend.roles.edit', compact('role'));
    }
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'));
    }