[GET] [/content/revisions/<id>]
Shows all the revisions for a given entry
@param int $id   The Content id
765415
public function actionRevisions($id=NULL)
	{
		if ($id == NULL)
			throw new CHttpException(400, Yii::t('Api.content', 'Missing ID'));

		$data = Content::model()->findRevisions($id);
		$response = array();
		foreach ($data as $model)
		{
			$response[] = $model->getAPIAttributes(array(),array(
				'author' => array(
					'password',
					'activation_key',
					'about',
					'user_role',
					'status',
					'created',
					'updated'
				),
				'category' => array(
					'parent_id'
				),
				'metadata' => array(
					'content_id'
				)
			));
		}

		return array(
			'count' => count($response),
			'data' => $response
		);
	}
1212226
public function findById($id, $draft = true)
    {
        if ($draft) {
            $this->setDraftVersionFilter(! $draft);
        }

        $blocks = $this->getRepository()->findById($id);

        if ($draft) {
            foreach ($blocks as $block) {
                if (null !== $revision = $this->revisionManager->getDraftRevision($block)) {
                    $this->revisionManager->revert($block, $revision);
                }
            }
        }

        return $blocks;
    }
438475
public function show($id)
    {
        $record = $this->modelRepository->findOrFail($id);

        $this->checkListParents(false);

        return view($this->getShowView(), [
            'moduleKey'           => $this->moduleKey,
            'routePrefix'         => $this->routePrefix,
            'permissionPrefix'    => $this->permissionPrefix,
            'model'               => $this->modelInformation,
            'record'              => $record,
            'recordReference'     => $this->getReferenceRepository()->getReferenceForModel($record),
            'fieldStrategies'     => $this->renderedShowFieldStrategies($record),
            'hasActiveListParent' => (bool) $this->listParentRelation,
            'topListParentOnly'   => $this->showsTopParentsOnly(),
            'listParents'         => $this->listParents,
        ]);
    }
523478
public function actionIndexPost($id=NULL)
	{
		if ($id === NULL)
			return $this->createComment();
		else
			return $this->updateComment($id);
	}
441581
public function edit($id)
    {
        $menu = $this->repository->find($id);

        if (empty($menu)) {
            Cms::notification('Menu not found', 'warning');

            return redirect(route($this->routeBase.'.menus.index'));
        }

        $links = $this->linkRepository->getLinksByMenu($menu->id);

        return view('cms::modules.menus.edit')->with('menu', $menu)->with('links', $links);
    }
112104
public function edit($id = null) {
        $cmsTermTaxonomy = $this->CmsTermTaxonomy->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $cmsTermTaxonomy = $this->CmsTermTaxonomy->patchEntity($cmsTermTaxonomy, $this->request->data);
            if ($this->CmsTermTaxonomy->save($cmsTermTaxonomy)) {
                $this->Flash->success('The cms term taxonomy has been saved.');
                return $this->redirect(['action' => 'index']);
            } else {
                $this->Flash->error('The cms term taxonomy could not be saved. Please, try again.');
            }
        }
        $cmsTerm = $this->CmsTermTaxonomy->CmsTerm->find('list', ['limit' => 200]);
        $this->set(compact('cmsTermTaxonomy', 'cmsTerm'));
        $this->set('_serialize', ['cmsTermTaxonomy']);
    }
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');
		}
	}
258657
private function findContentfulEntry(string $id): ?ContentfulEntry
    {
        return $this->entityManager->getRepository(ContentfulEntry::class)->find($id);
    }
577496
public function history($id)
    {
        $event = $this->repository->find($id);

        return view('cms::modules.events.history')
            ->with('event', $event);
    }
62070
public function edit($id)
	{
		// SECURITY:
		// if edit_permission is false, abort
		if (isset($this->crud['edit_permission']) && !$this->crud['edit_permission']) {
			abort(403, 'Not allowed.');
		}

		// get the info for that entry
		$model = $this->crud['model'];
		$this->data['entry'] = $model::find($id);
		$this->data['entry']->addFakes($this->getFakeColumnsAsArray());

		if (isset($this->data['crud']['update_fields']))
		{
			$this->crud['fields'] = $this->data['crud']['update_fields'];
		}

		// prepare the fields you need to show and prepopulate the values
		$this->prepareFields($this->data['entry']);
		$this->data['crud'] = $this->crud;

		// load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package
		return $this->firstViewThatExists('vendor.dick.crud.edit', 'crud::edit', $this->data);
	}
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'));
	}
613996
private function getRevisionsFromResult( $array ) {
		$revisions = new Revisions();
		$pageid = $array['pageid'];
		foreach ( $array['revisions'] as $revision ) {
			$revisions->addRevision(
				new Revision(
					$this->getContent( $array['contentmodel'], $revision['*'] ),
					new PageIdentifier( new Title( $array['title'], $array['ns'] ), $pageid ),
					$revision['revid'],
					new EditInfo(
						$revision['comment'],
						array_key_exists( 'minor', $revision ),
						array_key_exists( 'bot', $revision )
					),
					$revision['user'],
					$revision['timestamp']
				)
			);
		}

		return $revisions;
	}
20558
public function find(int $id)
    {
        return $this->cache->tags($this->getModel())->remember($id, 60, function () use ($id) {
            return $this->repository->find($id);
        });
    }
773126
public function show($id)
    {
        $event = $this->repository->find($id);

        if (empty($event)) {
            abort(404);
        }

        return view('cms-frontend::events.'.$event->template)->with('event', $event);
    }
1128833
public static function get_entry_by_id($id) {
        global $DB, $USER;

        $params = self::validate_parameters(self::get_entry_by_id_parameters(), array('id' => $id));
        $id = $params['id'];
        $warnings = array();

        // Get and validate the glossary.
        $entry = $DB->get_record('glossary_entries', array('id' => $id), '*', MUST_EXIST);
        list($glossary, $context) = self::validate_glossary($entry->glossaryid);

        if (empty($entry->approved) && $entry->userid != $USER->id && !has_capability('mod/glossary:approve', $context)) {
            throw new invalid_parameter_exception('invalidentry');
        }

        $entry = glossary_get_entry_by_id($id);
        self::fill_entry_details($entry, $context);

        return array(
            'entry' => $entry,
            'ratinginfo' => \core_rating\external\util::get_rating_info($glossary, $context, 'mod_glossary', 'entry',
                array($entry)),
            'warnings' => $warnings
        );
    }
291329
public function duplicateAction($id)
    {
        $contentManager = $this->get('opifer.content.content_manager');
        $content        = $contentManager->getRepository()->find($id);

        if ( ! $content) {
            throw $this->createNotFoundException('No content found for id ' . $id);
        }

        $duplicateContentId = $contentManager->duplicate($content);

        return $this->redirect($this->generateUrl('opifer_content_content_edit', [
            'id' => $duplicateContentId,
        ]));
    }
477944
public function show($id)
	{
		$entity = $this->getModel()->getRepository()->getById($id);

		return $this->response()
			->item($entity)
			->view($this->getView('show'), [
				'entity' => $entity
			]);
	}