Displays the edit collection page
@param null|integer $collection_id
556146
public function editCollection($collection_id = null)
    {
        $this->setCollection($collection_id);
        $this->setTitleEditCollection();
        $this->setBreadcrumbEditCollection();

        $this->setData('types', $this->collection->getTypes());
        $this->setData('collection', $this->data_collection);
        $this->setData('can_delete', $this->canDeleteCollection());
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditCollection();
        $this->outputEditCollection();
    }
180472
protected function updateCollection($collection_id)
    {
        if (!$this->isError() && !$this->collection->update($collection_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
157791
public function setMongaCollection($collection_name)
    {
        $this->collection = $this->database->collection($collection_name);
        return $this->collection;
    }
892161
public function editEditor($module_id, $file_id)
    {
        $this->setModuleEditor($module_id);
        $this->setFilePathEditor($file_id);
        $this->setTitleEditEditor();
        $this->setBreadcrumbEditEditor();
        $this->setMessageEditEditor();

        $this->setData('module', $this->data_module);
        $this->setData('can_save', $this->canSaveEditor());
        $this->setData('lines', count(file($this->data_file)));
        $this->setData('editor.content', file_get_contents($this->data_file));

        $this->submitEditor();
        $this->setJsSettingsEditor();
        $this->outputEditEditor();
    }
490376
public function view($id = null) {
		$block = $this->Blocks->get($id, [
			'contain' => []
		]);
		$this->set('block', $block);
	}
1138313
public function getEdit($id = null)
    {
        $group = Sentinel::getRoleRepository()->find($id);

        // Get the group's information
        if($group == null)
        {
            // Prepare the error message
            $error = Lang::get('base.groups.not_found');

            // Redirect to the post management page
            return Redirect::route('groups')->with('error', $error);
        }

        $groups = null;

        $groups2 = Sentinel::getRoleRepository()->all(['id', 'name']);

        foreach ($groups2 as $g)
            $groups[$g->id] = $g->name;

        // Show the page
        return View('admin.groups.edit', compact('group', 'groups'));
    }
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,
			]);
	}
77917
protected function edit_tour($id = null) {
        global $PAGE;
        if ($id) {
            $tour = tour::instance($id);
            $PAGE->navbar->add($tour->get_name(), $tour->get_edit_link());

        } else {
            $tour = new tour();
            $PAGE->navbar->add(get_string('newtour', 'tool_usertours'), $tour->get_edit_link());
        }

        $form = new forms\edittour($tour);

        if ($form->is_cancelled()) {
            redirect(helper::get_list_tour_link());
        } else if ($data = $form->get_data()) {
            // Creating a new tour.
            $tour->set_name($data->name);
            $tour->set_description($data->description);
            $tour->set_pathmatch($data->pathmatch);
            $tour->set_enabled(!empty($data->enabled));

            foreach (configuration::get_defaultable_keys() as $key) {
                $tour->set_config($key, $data->$key);
            }

            // Save filter values.
            foreach (helper::get_all_filters() as $filterclass) {
                $filterclass::save_filter_values_from_form($tour, $data);
            }

            $tour->persist();

            redirect(helper::get_list_tour_link());
        } else {
            if (empty($tour)) {
                $this->header('newtour');
            } else {
                if (!empty($tour->get_config(self::CONFIG_SHIPPED_TOUR))) {
                    notification::add(get_string('modifyshippedtourwarning', 'tool_usertours'), notification::WARNING);
                }

                $this->header($tour->get_name());
                $data = $tour->prepare_data_for_form();

                // Prepare filter values for the form.
                foreach (helper::get_all_filters() as $filterclass) {
                    $filterclass::prepare_filter_values_for_form($tour, $data);
                }
                $form->set_data($data);
            }

            $form->display();
            $this->footer();
        }
    }
139637
public function editCollection($args)
    {
        // Get dependencies
        $collectionMapper = ($this->container->dataMapper)('CollectionMapper');
        $json = $this->container->json;
        $toolbox = $this->container->toolbox;

        // Fetch collection group, or create new collection group
        if (isset($args['id']) && is_numeric($args['id'])) {
            $collection = $collectionMapper->findById($args['id']);
        } else {
            $definionParam = $this->request->getQueryParam('definition');

            // Validate that we have a proper definition file name
            if (null === $definionParam || 1 !== preg_match('/^[a-zA-Z0-9]+\.json$/', $definionParam)) {
                throw new Exception("PitonCMS: Invalid query parameter for 'definition': $definionParam");
            }

            // Create new collection and set template JSON file
            $collection = $collectionMapper->make();
            $collection->definition = $definionParam;
        }

        return $this->render('editCollection.html', $collection);
    }
1229497
public function actionEdit(int $id): void
	{
		$this->content = $this->orm->content->getById($id);
		if (!$this->content) {
			$this->error();
		}
	}
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"
        ]);
    }
1222413
private function page_edit( $table_name, $row_id = null ){
		$page_edit = new endpoint_form_edit($this->exdb, $this, $table_name, $row_id);
		return $page_edit->execute();
	}
621927
public function renderButtonsForCollection(CollectionInterface $collection)
    {
        // Generate buttons.
        foreach ($collection as $i => $model) {
            $previous = $collection->get($i - 1);
            $next     = $collection->get($i + 1);
            /** @var ModelInterface $model */
            $this->renderButtonsFor($model, $previous, $next);
        }
    }
499915
protected function updateCollection()
    {
        $this->controlAccess('collection_edit');

        if ($this->collection->update($this->data_collection['collection_id'], $this->getSubmitted())) {
            $this->redirect('admin/content/collection', $this->text('Collection has been updated'), 'success');
        }

        $this->redirect('', $this->text('Collection has not been updated'), 'danger');
    }
527499
public function edit($id = null)
    {
        $ticket = $this->Tickets->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $ticket = $this->Tickets->patchEntity($ticket, $this->request->data);
            if ($this->Tickets->save($ticket)) {
                $this->Flash->success(__('The ticket has been saved.'));

                return $this->redirect(['action' => 'index']);
            }
            $this->Flash->error(__('The ticket could not be saved. Please, try again.'));
        }
        $this->set(compact('ticket'));
        $this->set('_serialize', ['ticket']);
    }
1248218
public function edit($id = null) {
		$cell = $this->Cells->get($id, [
			'contain' => []
		]);
		if ($this->request->is(['patch', 'post', 'put'])) {
			$cell = $this->Cells->patchEntity($cell, $this->request->data);
			if ($this->Cells->save($cell)) {
				$this->Flash->success('The cell has been saved.');
				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error('The cell could not be saved. Please, try again.');
			}
		}
		$this->set(compact('cell'));
	}
1361451
public function editCategory($category_group_id, $category_id = null)
    {
        $this->setCategory($category_id);
        $this->setCategoryGroup($category_group_id);
        $this->setTitleEditCategory();
        $this->setBreadcrumbEditCategory();

        $this->setData('category', $this->data_category);
        $this->setData('can_delete', $this->canDeleteCategory());
        $this->setData('category_group', $this->data_category_group);
        $this->setData('parent_id', $this->getQuery('parent_id'));
        $this->setData('categories', $this->getOptionsCategory($category_group_id));
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditCategory();

        $this->setDataImagesEditCategory();
        $this->setDataCategoriesEditCategory();
        $this->outputEditCategory();
    }