Displays a single filed of model.
@param integer $id
@return mixed
496674
protected function viewDetail($id, $field)
    {
        $model = $this->findModel($id);
        $definition = array_merge($model->fields(), $model->extraFields());
        if (isset($definition[$field])) {
            return is_string($definition[$field]) ? $model->{$definition[$field]} : call_user_func($definition[$field], $model, $field);
        } elseif (in_array($field, $definition)) {
            return $model->$field;
        }
        throw new NotFoundHttpException("Object not found: $id/$field");
    }
283645
public function getAction($id)
    {
        $manager = $this->getTaskManager();

        return $this->handleView($this->view($manager->findById($id)));
    }
691552
public function show($id)
    {
        $newsletter = $this->newsletter->find($id);
        
        return view('newsletter::Frontend.show')->with(['newsletter' => $newsletter]);
    }
147007
protected function getModel ($id) {
		return isset ($this->models[$id]) ? $this->models[$id] : null;
	}
892257
public function actionView($id)
    {
        $model = $this->findModel($id);
        return $this->render('view', [
            'model' => $model,
            'idField' => $this->idField,
            'usernameField' => $this->usernameField,
            'fullNameField' => $this->fullNameField,
        ]);
    }
1219724
public function findOrFail(int $id)
    {
        $response = $this->model->with($this->with)->findOrFail($id);
        $this->with = [];
        return $response;
    }
1076622
public function getLoadedModel($id)
    {
        return isset($this->_loadModels[$id]) ? $this->_loadModels[$id] : null;
    }
65159
public function show($id)
    {
        $data['app_category'] = LarrockCategory::getConfig();
        $cache_key = sha1('AdminMethodsShowCategory'.$id.$this->config->getModelName());
        $data['category'] = Cache::rememberForever($cache_key, function () use ($id) {
            return LarrockCategory::getModel()->whereId($id)->with(['getChild', 'getParent'])->firstOrFail();
        });
        $cache_key = sha1('AdminMethodsShowData'.$id.$this->config->getModelName());
        $data['data'] = Cache::rememberForever($cache_key, function () use ($id) {
            return $this->config->getModel()->whereHas('getCategory', function ($q) use ($id) {
                $q->where('category.id', '=', $id);
            })->get();
        });

        return view('larrock::admin.admin-builder.categories', $data);
    }
37583
public function actionView($id)
    {

        $photos = GalleryPhoto::find()->where(['gallery_id' => $id])->orderBy('name')->all();

        return $this->render('view', [
            'model' => $this->findModel($id),
            'photos' => $photos,
        ]);
    }
160988
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerTermRelationships = new \yii\data\ArrayDataProvider([
            'allModels' => $model->termRelationships,
        ]);

        return $this->render('view', [
            'model'                     => $this->findModel($id),
            'providerTermRelationships' => $providerTermRelationships,
        ]);
    }
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,
        ]);
    }
450829
public function show($id)
    {
        try {
            $category = $this->repository->findById($id);

            return $this->view('categories.show', compact('category'));
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
506171
public function actionView($id)
    {
        $model = $this->findModel($id);
        $authManager = Yii::$app->authManager;
        $avaliable = [];
        foreach ($authManager->getRoles() as $role) {
            $avaliable[$role->name] = $role->name;
        }
        $assigned = [];
        foreach ($authManager->getRolesByUser($id) as $role) {
            $assigned[$role->name] = $role->name;
            unset($avaliable[$role->name]);
        }
        return $this->render('view', [
                'model' => $model,
                'avaliable' => $avaliable,
                'assigned' => $assigned,
                'idField' => $this->idField,
                'usernameField' => $this->usernameField,
        ]);
    }
421924
public function actionView($id)
	{
		//get the model, to use it within the meta tags
		$model = $this->findModel($id);
		//setting the meta keywords for this page
		$tok = new ClassifierBasedTokenizer(
	    new EndOfSentence(),
	    new WhitespaceTokenizer()
		);
		$text = strip_tags($model->content);
		$sentences = $tok->tokenize($text);
		if(is_array($sentences) && array_key_exists(0, $sentences))
		{			
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . substr($sentences[0],0,100)
	            ],
	            'keywords'
	        );
		}
		else{
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . $text
	            ],
	            'keywords'
	        );
		}

		$this->view->registerMetaTag(
            [
                'name'    => 'metakeywords',
                'content' => $model->tags
            ],
            'keywords'
        );

		return $this->render('onlineview', [
			'model' => $model,
		]);
	}
435410
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerProductUnitEquivalent = new \yii\data\ArrayDataProvider([
            'allModels' => $model->productUnitEquivalents,
        ]);
        return $this->render('view', [
            'model' => $this->findModel($id),
            'providerProductUnitEquivalent' => $providerProductUnitEquivalent,
        ]);
    }
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,
        ]);
    }
1015915
protected function findModel($id)
    {
        if (($model = Media::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }