Render model info
@param int $id
@param string $strictThumb only this thumb will be selected
@return string
481841
public function actionInfo($id, $strictThumb = null)
    {
        $model = Mediafile::findOne($id);
        Yii::$app->assetManager->bundles = false;
        return $this->renderAjax('info', [
            'model' => $model,
            'strictThumb' => $strictThumb,
        ]);
    }
1191462
public function actionInfo($id)
    {
        Url::remember('', 'actions-redirect');
        $user = $this->findModel($id);

        return $this->render('_info', [
            'user' => $user,
        ]);
    }
1108081
public function actionShow($id) {
    $profile = Profile::find()->byId($id)->one();

    if ($profile === null) {
      throw new NotFoundHttpException();
    }

    return $this->render('show', [
      'profile' => $profile,
    ]);
  }
725486
public function actionRaw($id)
    {
        $model = $this->findModel($id);
        if ($model && ($model->isPublic() || $model->isAuthor())) {
            Yii::$app->response->format = Response::FORMAT_RAW;
            return $model->content;
        } else {
            Yii::$app->session->setFlash('success', Yii::t('note', 'Note does not exist.'));
            return $this->redirect(['index']);
        }
    }
1301847
public static function get_publication($id, $courseid = 0, $strictness = IGNORE_MISSING) {
        global $DB;
        if (!$id && $strictness != MUST_EXIST) {
            return false;
        }
        $params = ['id' => $id, 'huburl' => HUB_MOODLEORGHUBURL];
        if ($courseid) {
            $params['courseid'] = $courseid;
        }
        return $DB->get_record('course_published', $params, '*', $strictness);
    }
991791
private function _getUrl($type = 'base', $id = 'null') {
		$modelClass = $this->modelClass;
		$collection = $modelClass::getResourceName();

		switch($type) {
			case 'api':
				return $this->_trailingSlash($modelClass::getApiUrl());
				break;
			case 'collection':
				return $this->_trailingSlash($collection, false);
				break;
			case 'element':
				return $this->_trailingSlash($collection) . $this->_trailingSlash($id, false);
				break;
		}

		return '';
	}
423389
public function actionView($id = 0, $slug= '')
    {
        $model = $this->findModel($id, $slug);
        if (\Yii::$app->user->can('viewPost', ['post' => $model])) {
            return $this->render('view', [
                'model' => $model,
            ]);
        } else
            throw new ForbiddenHttpException(Module::t('core', 'Access denied.'));
    }
1277573
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerAuthAssignment = new \yii\data\ArrayDataProvider([
            'allModels' => $model->authAssignments,
        ]);
        $providerAuthItemChild = new \yii\data\ArrayDataProvider([
            'allModels' => $model->authItemChildren,
        ]);
        return $this->render('view', [
            'model' => $this->findModel($id),
            'providerAuthAssignment' => $providerAuthAssignment,
            'providerAuthItemChild' => $providerAuthItemChild,
        ]);
    }
36044
public function show($id)
	{
		// get the info for that entry
		$model = $this->crud['model'];
		$this->data['entry'] = $model::find($id);
		$this->data['entry']->addFakes($this->getFakeColumnsAsArray());
		$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.show', 'crud::show', $this->data);
	}
77184
public static function renderFlashMessages($id = 'flash-messages')
    {
        $html = '';
    	foreach (self::getFlashMessages() as $label => $messages) {
    	    foreach ($messages as $message) {
    	        $html .= sprintf('<li class="%s">%s</li>', $label, $message);
    	    }
    	}
    	if (empty($html)) {
    	    return '';
    	}
    	return '<ul id="' . $id . '">' . $html . '</ul>';
    }
432182
public function actionQuestion($id)
    {
        $user = $this->findModel($id);
        $query = Question::find()->where(['user_id' => $id])->orderBy(['created_at' => SORT_DESC]);
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        return $this->render('question', [
            'user' => $user,
            'dataProvider' => $dataProvider
        ]);
    }
1144462
public function preview($id)
	{
		if ( ! $this->auth->check())
		{
			return App::abort(404, 'Page not found');
		}

		return View::make($this->theme.'.preview', array('id' => $id));
	}
630472
public function renderAdd(int $id = null): void
	{
		$this['editForm']->setDefaults([
			'locale' => $this->localeService->defaultLocaleId,
			'parent' => $id
		]);
		$this->setView('edit');
		$this->template->viewLinks = false;
	}
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,
        ]);
    }
1142547
public function previewAction($id, Request $request)
    {
        if (!$page = $this->get('synapse.page.loader')->retrieve($id)) {
            throw new NotFoundHttpException(sprintf('"Page#%s" not found.',
                $id
            ));
        }

        return $this->renderPage($page, $request);
    }
1321061
public function actionView($id)
    {
        $this->layout = static::MAIN_LAYOUT;
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }
534066
public function actionView($id)
    {
        $model = $this->findModel($id);
        $model->updateCounters(['views' => 1]);
        return $this->render($model->view, [
            'model' => $model,
        ]);
    }