Edites an existing Language model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
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]);
    }
165054
public function edit($id = null)
    {
        $album = $this->PhotosAlbums->get($id);

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

            if ($this->PhotosAlbums->save($album)) {
                $this->Flash->success(I18N_OPERATION_OK);

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

            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        $this->set(compact('album'));
    }
753304
public function edit($id)
	{
        $category = $this->model->findOrFail($id);
        return view('LaravelAdminBlog::categories.edit')
            ->with('category', $category)
            ->with('activeMenu', 'sidebar.Blog.Categories');
	}
550857
public function edit($id)
    {
        if (!$role = $this->roleRepositoryInterface->getById($id)) {
            Flash::error(trans('dashboard::dashboard.errors.role.found'));

            return redirect()->route('roles.index');
        }

        $permissions = $this->permissionRepositoryInterface->getAll();

        return $this->view('roles.edit')->with(['role' => $role, 'permissions' => $permissions]);
    }
372333
public function edit($id)
    {
        $role = $this->roles->findById($id);
        $permissionIds = $this->roles->getPermissions();

        if (! $role) {
            return $this->handleError(trans('soda::errors.not-found', ['object' => 'role']));
        }

        app('soda.interface')->setHeading($role->display_name);
        app('soda.interface')->breadcrumbs()->addLink(route('soda.roles.index'), 'Roles');

        return soda_cms_view('data.roles.view', compact('role', 'permissionIds'));
    }
1056018
public function edit($id)
    {
        $user = $this->service->find($id);
        return view('admin.users.edit')->with('user', $user);
    }
222225
protected function __apiUpdate(string $id)
    {
        $record = HCCountries::findOrFail($id);
        $record->languages()->sync(array_get($this->getInputData(), 'languages'));

        return $this->apiShow($record->id);
    }
258532
public function edit($id)
    {
        try {
            $role = $this->repository->findById($id);

            $permission_role = $role->permissions->lists('id');

            return $this->view('roles.edit', compact('role', 'permission_role'));
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
1303249
public function actionView($id)
    {
        $model = $this->findModel($id);
        $modelsI18n = $model->prepareI18nModels();

        if ($model->pageSize > 0) {
            $model->orderBy = $model::$defaultOrderBy;
            $model->page = $model->calcPage();
        }

        // build frontend links
        $lh = $this->module->langHelper;
        $editAllLanguages = empty($this->module->params['editAllLanguages'])
                          ? false : $this->module->params['editAllLanguages'];
        $languages = $lh::activeLanguages($editAllLanguages);
        if (Yii::$app instanceof UniApplication && Yii::$app->type == UniApplication::APP_TYPE_BACKEND) {
            $containerModule = $this->module->module;
            if ($containerModule instanceof UniModule && array_key_exists(static::$sysAppModel, $containerModule->models)) {
                $appModel = $containerModule::model(static::$sysAppModel);
                $appFront = $appModel::initFrontendApplication();  // for backend application init separate frontend-application
              //$appFront->urlManager->baseUrl = 'http://www.mysite.com';  // frontend domain - set from app-params
            }
        }
        $moduleUid = $this->module->uniqueId;
        $frontendLinks = [];
        foreach ($languages as $langCode => $lang) {
            $frontendLinks[$langCode] = '';
            if ($model->hasInvisibleParent()) {
                if (empty($model->route)) {
                    $frontendLinks[$langCode] = Url::toRoute(["/{$moduleUid}/main/show", 'id' => $model->id, 'slug' => $model->slug]);
                } else {  // external/internal link
                    $frontendLinks[$langCode] = ContentMenuBuilder::routeToLink($model->route);
                }
            } else {
                $frontendLinks[$langCode] = Url::toRoute(["/{$moduleUid}/main/view"
                  , 'id' => $model->id, 'lang' => $langCode], true);
            }
        }
        if (!empty($appModel)) $appModel::restoreApplication();

        return $this->render('view', compact('model', 'modelsI18n', 'frontendLinks'));
    }
1122753
public function createEditForm($id) {
        $entity = $this->read_handler->get($id);
        $edit_form = $this->form_factory->create(new Type(), $entity);

        return $edit_form;
    }
270443
public function getEdit($id) {
    $vocabulary = $this->vocabulary->find($id);

    Session::put('vocabulary_id', $vocabulary->id);

    if (is_null($vocabulary)) {
      return Redirect::route($this->route_prefix . 'taxonomy.index');
    }

    $terms = $vocabulary->terms()->orderBy('parent', 'ASC')->orderBy('weight', 'ASC')->get();

    $ordered_terms = [];
    foreach ($terms as $term) {
      if (!$term->parent) {
        $ordered_terms[$term->id] = [
          'term' => $term,
          'children' => [],
        ];
      }
      else {
        $ordered_terms[$term->parent]['children'][] = $term;
      }
    }

    $terms = $ordered_terms;

    return View::make('taxonomy::vocabulary.edit', compact('vocabulary', 'terms'));
  }
624682
protected function __apiUpdate(string $id)
    {
        $record = HCPages::findOrFail($id);

        $data = $this->getInputData();

        $record->update(array_get($data, 'record'));
        $record->updateTranslations(array_get($data, 'translations'));
        $record->categories()->sync(array_get($data, 'categories', []));
        $record->removeCachedMenu();

        return $this->apiShow($record->id);
    }
288188
public function edit($id)
    {
        $entry = $this->entriesRepository->getById($id, $this->resource);

        return view('laramanager::entries.edit')
            ->with('resource', $this->resource)
            ->with('entry', $entry);
    }
999860
public function edit($id)
    {
        $notification = $this->service->find($id);
        return view('admin.notifications.edit')->with('notification', $notification);
    }
1112388
public function edit($id)
    {
        $this->builder->setMode(Builder::MODE_EDIT);
        $this->builder->setResourceId($id);

        $this->setFieldValue($id);

        return $this;
    }
776611
public function actionUpdate($id)
    {
        if (request()->post('_asnew') == '1') {
            $model = new Comment();
        }else{
            $model = $this->findModel($id);
        }

        if ($model->loadAll(request()->post())) {
            if ($model->saveAll()) {
                set_flash_has_been_saved();
                return $this->redirect(['update', 'id' => $model->id]);
            } else {
                set_flash_has_not_been_saved();
            }
        }

        return $this->render('update', [
            'model' => $model,
        ]);

    }
398186
public function edit(string $id)
    {
        $entity = $this->Dblists->get($id);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $entity = $this->Dblists->patchEntity($entity, (array)$this->request->getData());
            if ($this->Dblists->save($entity)) {
                $this->Flash->success('The database list has been saved.');

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

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

        $this->set(compact('entity'));
        $this->set('_serialize', ['entity']);
    }