Display the edit step form for the specified step.

@param   int     $id     The step to edit.
334041
protected function edit_step($id) {
        global $PAGE;

        if (isset($id)) {
            $step = step::instance($id);
        } else {
            $step = new step();
            $step->set_tourid(required_param('tourid', PARAM_INT));
        }

        $tour = $step->get_tour();

        if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
            notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
        }

        $PAGE->navbar->add($tour->get_name(), $tour->get_view_link());
        if (isset($id)) {
            $PAGE->navbar->add($step->get_title(), $step->get_edit_link());
        } else {
            $PAGE->navbar->add(get_string('newstep', 'tool_usertours'), $step->get_edit_link());
        }

        $form = new forms\editstep($step->get_edit_link(), $step);
        if ($form->is_cancelled()) {
            redirect($step->get_tour()->get_view_link());
        } else if ($data = $form->get_data()) {
            $step->handle_form_submission($form, $data);
            $step->get_tour()->reset_step_sortorder();
            redirect($step->get_tour()->get_view_link());
        } else {
            if (empty($id)) {
                $this->header(get_string('newstep', 'tool_usertours'));
            } else {
                $this->header(get_string('editstep', 'tool_usertours', $step->get_title()));
            }
            $form->set_data($step->prepare_data_for_form());

            $form->display();
            $this->footer();
        }
    }
383747
public function edit($page, $id)
    {
        $this->authorize('update', $eloquent = app('scaffold.model'));

        return view(app('scaffold.template')->edit('index'), [
            'item' => $eloquent,
        ]);
    }
1157404
public function Form( $id = '' ) {
		if ( $id == '' ) {
			$url = $this->url->linkTo( 'index.php/save' );
		} else {
			$url = $this->url->linkTo( 'index.php/update/' . $id );
		}

		return $this->view( 'form', array( 'id' => $id, 'url' => $url ) );
	}
202017
public function actionEdit($id) 
	{
		$model=$this->loadModel($id);

		// Uncomment the following line if AJAX validation is needed
		$this->performAjaxValidation($model);

		if(isset($_POST['OmmuPages'])) {
			$model->attributes=$_POST['OmmuPages'];
			
			if($model->save()) {
				Yii::app()->user->setFlash('success', Yii::t('phrase', 'Pages success updated.'));
				$this->redirect(array('manage'));
			}
		}

		$this->pageTitle = Yii::t('phrase', 'Update Page: $page_name', array('$page_name'=>$model->title->message));
		$this->pageDescription = '';
		$this->pageMeta = '';
		$this->render('admin_edit', array(
			'model'=>$model,
		));
	}
57739
public function edit($id)
    {
        $feature = $this->service->find($id);
        return view('admin.features.edit')->with('feature', $feature);
    }
1372042
public function handleEdit(int $id)
    {
        if ($this->presenter->isAjax())
        {
            $this->categoryId = $id;
            $this->onOpen();
        }
    }
30260
public function editAction($id)
    {
        $instance = $this->getManager()->find($id);
        if(!$instance) {
            return new RedirectResponse($this->generateUrl('ringo_php_redmon'));
        }
        $form = $this->getForm($instance);
        return $this->render(
            $this->getTemplatePath().'edit.html.twig',
            array(
                'form' => $form->createView(),
                'id'   => $id,
                'errors' => array()
            )
        );
    }
478422
public function edit($id)
    {
        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('edit'))
        {
            Session::flash('status_code', 400 );
            $message = "You are not allowed to edit ".$this->table_type_plural;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'        => $this->package_title,
                'table_type_plural'    => $this->table_type_plural,
                'table_type_singular'  => $this->table_type_singular,
                'resource_route_name'  => $this->resource_route_name,
                'HTMLHelper'           => HTMLHelper::class,
            ]);
        }

        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $message = 'This tag is not available for editing, as someone else is currently editing this tag';
            Session::flash('message', $message);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.'.$this->resource_route_name.'.index');
        }

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

        return view('formhandling::lookuptables/' . config('lasallecmsadmin.admin_template_name') . '/create', [
            'package_title'       => $this->package_title,
            'table_type_plural'   => $this->table_type_plural,
            'table_type_singular' => $this->table_type_singular,
            'resource_route_name' => $this->resource_route_name,
            'DatesHelper'         => DatesHelper::class,
            'HTMLHelper'          => HTMLHelper::class,
            'record'              => $this->repository->getFind($id),
        ]);
    }
751754
protected function move_step($id) {
        require_sesskey();

        $direction = required_param('direction', PARAM_INT);

        $step = step::instance($id);
        $currentsortorder   = $step->get_sortorder();
        $targetsortorder    = $currentsortorder + $direction;

        $tour = $step->get_tour();
        $swapwith = helper::get_step_from_sortorder($tour->get_id(), $targetsortorder);

        // Set the sort order to something out of the way.
        $step->set_sortorder(-1);
        $step->persist();

        // Swap the two sort orders.
        $swapwith->set_sortorder($currentsortorder);
        $swapwith->persist();

        $step->set_sortorder($targetsortorder);
        $step->persist();

        // Reset the sort order.
        $tour->reset_step_sortorder();
        redirect($tour->get_view_link());
    }
604313
public function getPostEditPost($id)
    {
        $form = new EditPostForm($this->di, $id);
        $form->check();

        $views = [
            ["comment/default-form", ["form" => $form->getHTML()], "main"]
        ];

        $this->di->get("pageRenderComment")->renderPage([
            "views" => $views,
            "title" => "Edit post | $id"
        ]);
    }
1051208
public function edit($id)
    {
        $team = $this->service->find($id);
        return view('team.edit')->with('team', $team);
    }
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'), '#');
    }
1112388
public function edit($id)
    {
        $this->builder->setMode(Builder::MODE_EDIT);
        $this->builder->setResourceId($id);

        $this->setFieldValue($id);

        return $this;
    }
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,
			]);
	}
7428
public function edit($name, $id)
	{
		$model = Bauhaus::getInstance($name)->buildForm($id);

		return View::make($model->getView('edit'))
			->with('name',  $name)
			->with('model', $model)
			->with('id',    $id);
	}
1283825
public function actionEdit(int $id): void
	{
		$this->page = $this->orm->pages->getById($id);
		if (!$this->page) {
			$this->error();
		}

		$gallery = $this['gallery'];
		$gallery->setStorage($this->orm->pagesGalleries);
		$gallery->setForeignKey('page', $this->page->id);
		$gallery->setNamespace('page/' . $this->page->url);
	}
425716
public function showAction($id)
    {
        $this->initializeScaffolding();

        $this->beforeRead();
        $this->view->record = $this->scaffolding->doRead($id);
        $this->view->fields = $this->showFields;
        $this->afterRead();
    }